add support for menu plugin
diff --git a/DESCRIPTION b/DESCRIPTION
index 50986ad..077f3b2 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -8,6 +8,8 @@
        comment = "reveal.js-3.2.0, https://github.com/hakimel/reveal.js"),
     person("Asvin", "Goel", role = c("ctb", "cph"), email = "goel@telematique.eu",
        comment = "chalkboard plugin"),
+    person("Greg", "Denehy", role = c("ctb", "cph"),
+       comment = "menu plugin"),
     person("JJ", "Allaire", role = c("aut", "cre"), email = "jj@rstudio.com"),
     person(family = "RStudio", role = "cph")
   )
diff --git a/R/revealjs_presentation.R b/R/revealjs_presentation.R
index f486044..f8d9906 100644
--- a/R/revealjs_presentation.R
+++ b/R/revealjs_presentation.R
@@ -22,7 +22,7 @@
 #'   \href{https://github.com/hakimel/reveal.js#configuration}{https://github.com/hakimel/reveal.js#configuration}
 #'    for details).
 #' @param reveal_plugins Reveal plugins to include. Available plugins include
-#'   "notes", "search", "zoom", and "chalkboard". Note that
+#'   "notes", "search", "zoom", "chalkboard", and "menu". Note that
 #'   \code{self_contained} must be set to \code{FALSE} in order to use Reveal
 #'   plugins.
 #' @param template Pandoc template to use for rendering. Pass "default" to use 
@@ -152,12 +152,12 @@
     }
     
     for (option in names(reveal_options)) {
-      # special handling for nested chalkboard options
-      if (identical(option, "chalkboard")) {
-        chalkboard_options <- reveal_options[[option]]
-        for (chalkboard_option in names(chalkboard_options)) {
-          add_reveal_option(paste0("chalkboard-", chalkboard_option),
-                            chalkboard_options[[chalkboard_option]])
+      # special handling for nested options
+      if (option %in% c("chalkboard", "menu")) {
+        nested_options <- reveal_options[[option]]
+        for (nested_option in names(nested_options)) {
+          add_reveal_option(paste0(option, "-", nested_option),
+                            nested_options[[nested_option]])
         }
       }
       # standard top-level options
@@ -175,7 +175,7 @@
       stop("Using reveal_plugins requires self_contained: false")
     
     # validate specified plugins are supported
-    supported_plugins <- c("notes", "search", "zoom", "chalkboard")
+    supported_plugins <- c("notes", "search", "zoom", "chalkboard", "menu")
     invalid_plugins <- setdiff(reveal_plugins, supported_plugins)
     if (length(invalid_plugins) > 0)
       stop("The following plugin(s) are not supported: ",
@@ -184,7 +184,7 @@
     # add plugins
     sapply(reveal_plugins, function(plugin) {
       args <<- c(args, pandoc_variable_arg(paste0("plugin-", plugin), "1"))
-      if (identical(plugin, "chalkboard")) {
+      if (plugin %in% c("chalkboard", "menu")) {
         extra_dependencies <<- append(extra_dependencies,
                                      list(rmarkdown::html_dependency_font_awesome()))
           
diff --git a/README.Rmd b/README.Rmd
index 219dd65..399c689 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -199,7 +199,7 @@
 
 ## Reveal Options
 
-Reveal.js has many additional options to conigure it's behavior. You can specify any of these options using `reveal_options`, for example:
+Reveal.js has many additional options to configure it's behavior. You can specify any of these options using `reveal_options`, for example:
 
     ---
     title: "Habits"
@@ -309,6 +309,7 @@
 | [zoom](http://lab.hakim.se/zoom-js/) | Zoom in and out of selected content with Alt+Click. |
 | [search](https://github.com/hakimel/reveal.js/blob/master/plugin/search/search.js) | Find a text string anywhere in the slides and show the next occurrence to the user. |
 | [chalkboard](https://github.com/rajgoel/reveal.js-plugins/tree/master/chalkboard) | Include handwritten notes within a presentation. |
+| [menu](https://github.com/denehyg/reveal.js-menu) | Include a navigation menu within a presentation. |
 
 Note that the use of plugins requires that the `self_contained` option be set to false. For example, this presentation includes both the "notes" and "search" plugins:
 
@@ -320,18 +321,20 @@
         reveal_plugins: ["notes", "search"]
     ---
 
-You can specify additional options for the `chalkboard` plugin using `reveal_options`, for example:
+You can specify additional options for the `chalkboard` and `menu` plugins using `reveal_options`, for example:
 
     ---
     title: "Habits"
     output:
       revealjs::revealjs_presentation:
         self_contained: false
-        reveal_plugins: ["chalkboard"]
+        reveal_plugins: ["chalkboard", "menu"]
         reveal_options:
           chalkboard:
             theme: whiteboard
             toggleNotesButton: false
+          menu:
+            side: right
     ---
 
 
diff --git a/README.md b/README.md
index 640d4b8..0086e02 100644
--- a/README.md
+++ b/README.md
@@ -206,7 +206,7 @@
 Reveal Options
 --------------
 
-Reveal.js has many additional options to conigure it's behavior. You can specify any of these options using `reveal_options`, for example:
+Reveal.js has many additional options to conifgure it's behavior. You can specify any of these options using `reveal_options`, for example:
 
     ---
     title: "Habits"
diff --git a/examples/simple.Rmd b/examples/simple.Rmd
index 0b4fa4f..5a8ac0a 100644
--- a/examples/simple.Rmd
+++ b/examples/simple.Rmd
@@ -3,11 +3,13 @@
 output: 
   revealjs::revealjs_presentation:
     self_contained: false
-    reveal_plugins: ["search", "zoom", "notes", "chalkboard"]
+    reveal_plugins: ["search", "zoom", "notes", "chalkboard", "menu"]
     reveal_options:
       chalkboard: 
         theme: chalkboard
-        toggleNotesButton: false
+        toggleNotesButton: true
+      menu:
+        numbers: true
 ---
 
 ```{r setup, include=FALSE}
diff --git a/inst/NEWS b/inst/NEWS
index f8f4250..8ec4b80 100644
--- a/inst/NEWS
+++ b/inst/NEWS
@@ -1,6 +1,8 @@
 Version 0.9 (Unreleased)
 -----------------------------------------------------------------------
 
+- Add support for the menu plugin
+
 - Correct handling of pdf css for self_contained document
 
 - Remove html5shiv.js from template
diff --git a/inst/reveal.js-3.3.0/plugin/menu/lib/bowser.min.js b/inst/reveal.js-3.3.0/plugin/menu/lib/bowser.min.js
new file mode 100755
index 0000000..eb87d46
--- /dev/null
+++ b/inst/reveal.js-3.3.0/plugin/menu/lib/bowser.min.js
@@ -0,0 +1,6 @@
+/*!
+  * Bowser - a browser detector
+  * https://github.com/ded/bowser
+  * MIT License | (c) Dustin Diaz 2014
+  */
+!function(e,t){typeof module!="undefined"&&module.exports?module.exports.browser=t():typeof define=="function"&&define.amd?define(t):this[e]=t()}("bowser",function(){function t(t){function n(e){var n=t.match(e);return n&&n.length>1&&n[1]||""}function r(e){var n=t.match(e);return n&&n.length>1&&n[2]||""}var i=n(/(ipod|iphone|ipad)/i).toLowerCase(),s=/like android/i.test(t),o=!s&&/android/i.test(t),u=n(/edge\/(\d+(\.\d+)?)/i),a=n(/version\/(\d+(\.\d+)?)/i),f=/tablet/i.test(t),l=!f&&/[^-]mobi/i.test(t),c;/opera|opr/i.test(t)?c={name:"Opera",opera:e,version:a||n(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(t)?c={name:"Yandex Browser",yandexbrowser:e,version:a||n(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/windows phone/i.test(t)?(c={name:"Windows Phone",windowsphone:e},u?(c.msedge=e,c.version=u):(c.msie=e,c.version=n(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?c={name:"Internet Explorer",msie:e,version:n(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(t)?c={name:"Microsoft Edge",msedge:e,version:u}:/chrome|crios|crmo/i.test(t)?c={name:"Chrome",chrome:e,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:i?(c={name:i=="iphone"?"iPhone":i=="ipad"?"iPad":"iPod"},a&&(c.version=a)):/sailfish/i.test(t)?c={name:"Sailfish",sailfish:e,version:n(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?c={name:"SeaMonkey",seamonkey:e,version:n(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel/i.test(t)?(c={name:"Firefox",firefox:e,version:n(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(c.firefoxos=e)):/silk/i.test(t)?c={name:"Amazon Silk",silk:e,version:n(/silk\/(\d+(\.\d+)?)/i)}:o?c={name:"Android",version:a}:/phantom/i.test(t)?c={name:"PhantomJS",phantom:e,version:n(/phantomjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?c={name:"BlackBerry",blackberry:e,version:a||n(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:/(web|hpw)os/i.test(t)?(c={name:"WebOS",webos:e,version:a||n(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(c.touchpad=e)):/bada/i.test(t)?c={name:"Bada",bada:e,version:n(/dolfin\/(\d+(\.\d+)?)/i)}:/tizen/i.test(t)?c={name:"Tizen",tizen:e,version:n(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||a}:/safari/i.test(t)?c={name:"Safari",safari:e,version:a}:c={name:n(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!c.msedge&&/(apple)?webkit/i.test(t)?(c.name=c.name||"Webkit",c.webkit=e,!c.version&&a&&(c.version=a)):!c.opera&&/gecko\//i.test(t)&&(c.name=c.name||"Gecko",c.gecko=e,c.version=c.version||n(/gecko\/(\d+(\.\d+)?)/i)),!c.msedge&&(o||c.silk)?c.android=e:i&&(c[i]=e,c.ios=e);var h="";c.windowsphone?h=n(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i?(h=n(/os (\d+([_\s]\d+)*) like mac os x/i),h=h.replace(/[_\s]/g,".")):o?h=n(/android[ \/-](\d+(\.\d+)*)/i):c.webos?h=n(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):c.blackberry?h=n(/rim\stablet\sos\s(\d+(\.\d+)*)/i):c.bada?h=n(/bada\/(\d+(\.\d+)*)/i):c.tizen&&(h=n(/tizen[\/\s](\d+(\.\d+)*)/i)),h&&(c.osversion=h);var p=h.split(".")[0];if(f||i=="ipad"||o&&(p==3||p==4&&!l)||c.silk)c.tablet=e;else if(l||i=="iphone"||i=="ipod"||o||c.blackberry||c.webos||c.bada)c.mobile=e;return c.msedge||c.msie&&c.version>=10||c.yandexbrowser&&c.version>=15||c.chrome&&c.version>=20||c.firefox&&c.version>=20||c.safari&&c.version>=6||c.opera&&c.version>=10||c.ios&&c.osversion&&c.osversion.split(".")[0]>=6||c.blackberry&&c.version>=10.1?c.a=e:c.msie&&c.version<10||c.chrome&&c.version<20||c.firefox&&c.version<20||c.safari&&c.version<6||c.opera&&c.version<10||c.ios&&c.osversion&&c.osversion.split(".")[0]<6?c.c=e:c.x=e,c}var e=!0,n=t(typeof navigator!="undefined"?navigator.userAgent:"");return n.test=function(e){for(var t=0;t<e.length;++t){var r=e[t];if(typeof r=="string"&&r in n)return!0}return!1},n._detect=t,n})
\ No newline at end of file
diff --git a/inst/reveal.js-3.3.0/plugin/menu/lib/jeesh.min.js b/inst/reveal.js-3.3.0/plugin/menu/lib/jeesh.min.js
new file mode 100755
index 0000000..fb49bed
--- /dev/null
+++ b/inst/reveal.js-3.3.0/plugin/menu/lib/jeesh.min.js
@@ -0,0 +1,42 @@
+/*!
+  * =============================================================
+  * Ender: open module JavaScript framework (https://ender.no.de)
+  * Build: ender build jeesh --output jeesh
+  * =============================================================
+  */
+
+
+/*!
+  * Ender: open module JavaScript framework (client-lib)
+  * copyright Dustin Diaz & Jacob Thornton 2011 (@ded @fat)
+  * http://ender.no.de
+  * License MIT
+  */
+!function(a){function d(a){var c=b[a]||window[a];if(!c)throw new Error("Requested module '"+a+"' has not been defined.");return c}function e(a,c){return b[a]=c}function f(a,b){for(var c in b)c!="noConflict"&&c!="_VERSION"&&(a[c]=b[c]);return a}function g(a,b,c){return typeof a=="string"||a.nodeName||a.length&&"item"in a||a==window?(c=h._select(a,b),c.selector=a):c=isFinite(a.length)?a:[a],f(c,g)}function h(a,b){return g(a,b)}a.global=a;var b={},c=a.$;a.provide=e,a.require=d,f(h,{_VERSION:"0.3.6",fn:g,ender:function(a,b){f(b?g:h,a)},_select:function(a,b){return(b||document).querySelectorAll(a)}}),f(g,{forEach:function(a,b,c){for(c=0,l=this.length;c<l;++c)c in this&&a.call(b||this[c],this[c],c,this);return this},$:h}),h.noConflict=function(){return a.$=c,this},typeof module!="undefined"&&module.exports&&(module.exports=h),a.ender=a.$=a.ender||h}(this),!function(){var a={exports:{}},b=a.exports;
+/*!
+    * bean.js - copyright Jacob Thornton 2011
+    * https://github.com/fat/bean
+    * MIT License
+    * special thanks to:
+    * dean edwards: http://dean.edwards.name/
+    * dperini: https://github.com/dperini/nwevents
+    * the entire mootools team: github.com/mootools/mootools-core
+    */
+!function(b,c,d){typeof a!="undefined"?a.exports=d(b,c):typeof define=="function"&&typeof define.amd=="object"?define(d):c[b]=d(b,c)}("bean",this,function(a,b){var c=window,d=b[a],e=/over|out/,f=/[^\.]*(?=\..*)\.|.*/,g=/\..*/,h="addEventListener",i="attachEvent",j="removeEventListener",k="detachEvent",l=document||{},m=l.documentElement||{},n=m[h],o=n?h:i,p=Array.prototype.slice,q=/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,r=/mouse.*(wheel|scroll)/i,s=/^text/i,t=/^touch|^gesture/i,u={one:1},v=function(a,b,c){for(c=0;c<b.length;c++)a[b[c]]=1;return a}({},("click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange error abort scroll "+(n?"show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend message readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ":"")).split(" ")),w=function(){function c(a){var c=a.relatedTarget;return c?c!==this&&c.prefix!=="xul"&&!/document/.test(this.toString())&&!b(c,this):c===null}var a="compareDocumentPosition",b=a in m?function(b,c){return c[a]&&(c[a](b)&16)===16}:"contains"in m?function(a,b){return b=b.nodeType===9||b===window?m:b,b!==a&&b.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0};return{mouseenter:{base:"mouseover",condition:c},mouseleave:{base:"mouseout",condition:c},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}}(),x=function(){var a="altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which".split(" "),b=a.concat("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" ")),c=b.concat("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis".split(" ")),d=a.concat("char charCode key keyCode keyIdentifier keyLocation".split(" ")),f=a.concat(["data"]),g=a.concat("touches targetTouches changedTouches scale rotation".split(" ")),h="preventDefault",i=function(a){return function(){a[h]?a[h]():a.returnValue=!1}},j="stopPropagation",k=function(a){return function(){a[j]?a[j]():a.cancelBubble=!0}},n=function(a){return function(){a[h](),a[j](),a.stopped=!0}},o=function(a,b,c){var d,e;for(d=c.length;d--;)e=c[d],!(e in b)&&e in a&&(b[e]=a[e])};return function(p,u){var v={originalEvent:p,isNative:u};if(!p)return v;var w,x=p.type,y=p.target||p.srcElement;v[h]=i(p),v[j]=k(p),v.stop=n(v),v.target=y&&y.nodeType===3?y.parentNode:y;if(u){if(x.indexOf("key")!==-1)w=d,v.keyCode=p.which||p.keyCode;else if(q.test(x)){w=b,v.rightClick=p.which===3||p.button===2,v.pos={x:0,y:0};if(p.pageX||p.pageY)v.clientX=p.pageX,v.clientY=p.pageY;else if(p.clientX||p.clientY)v.clientX=p.clientX+l.body.scrollLeft+m.scrollLeft,v.clientY=p.clientY+l.body.scrollTop+m.scrollTop;e.test(x)&&(v.relatedTarget=p.relatedTarget||p[(x==="mouseover"?"from":"to")+"Element"])}else t.test(x)?w=g:r.test(x)?w=c:s.test(x)&&(w=f);o(p,v,w||a)}return v}}(),y=function(a,b){return!n&&!b&&(a===l||a===c)?m:a},z=function(){function a(a,b,c,d,e){this.element=a,this.type=b,this.handler=c,this.original=d,this.namespaces=e,this.custom=w[b],this.isNative=v[b]&&a[o],this.eventType=n||this.isNative?b:"propertychange",this.customType=!n&&!this.isNative&&b,this.target=y(a,this.isNative),this.eventSupport=this.target[o]}return a.prototype={inNamespaces:function(a){var b,c;if(!a)return!0;if(!this.namespaces)return!1;for(b=a.length;b--;)for(c=this.namespaces.length;c--;)if(a[b]===this.namespaces[c])return!0;return!1},matches:function(a,b,c){return this.element===a&&(!b||this.original===b)&&(!c||this.handler===c)}},a}(),A=function(){var a={},b=function(c,d,e,f,g){if(!d||d==="*")for(var h in a)h.charAt(0)==="$"&&b(c,h.substr(1),e,f,g);else{var i=0,j,k=a["$"+d],l=c==="*";if(!k)return;for(j=k.length;i<j;i++)if(l||k[i].matches(c,e,f))if(!g(k[i],k,i,d))return}},c=function(b,c,d){var e,f=a["$"+c];if(f)for(e=f.length;e--;)if(f[e].matches(b,d,null))return!0;return!1},d=function(a,c,d){var e=[];return b(a,c,d,null,function(a){return e.push(a)}),e},e=function(b){return(a["$"+b.type]||(a["$"+b.type]=[])).push(b),b},f=function(c){b(c.element,c.type,null,c.handler,function(b,c,d){return c.splice(d,1),c.length===0&&delete a["$"+b.type],!1})},g=function(){var b,c=[];for(b in a)b.charAt(0)==="$"&&(c=c.concat(a[b]));return c};return{has:c,get:d,put:e,del:f,entries:g}}(),B=n?function(a,b,c,d){a[d?h:j](b,c,!1)}:function(a,b,c,d,e){e&&d&&a["_on"+e]===null&&(a["_on"+e]=0),a[d?i:k]("on"+b,c)},C=function(a,b,d){var e=b.__beanDel,f=function(f){return f=x(f||((this.ownerDocument||this.document||this).parentWindow||c).event,!0),e&&(f.currentTarget=e.ft(f.target,a)),b.apply(a,[f].concat(d))};return f.__beanDel=e,f},D=function(a,b,d,e,f,g){var h=b.__beanDel,i=function(i){var j=h?h.ft(i.target,a):this;if(e?e.apply(j,arguments):n?!0:i&&i.propertyName==="_on"+d||!i)i&&(i=x(i||((this.ownerDocument||this.document||this).parentWindow||c).event,g),i.currentTarget=j),b.apply(a,i&&(!f||f.length===0)?arguments:p.call(arguments,i?0:1).concat(f))};return i.__beanDel=h,i},E=function(a,b,c,d,e){return function(){a(b,c,e),d.apply(this,arguments)}},F=function(a,b,c,d){var e,f,h,i=b&&b.replace(g,""),j=A.get(a,i,c);for(e=0,f=j.length;e<f;e++)j[e].inNamespaces(d)&&((h=j[e]).eventSupport&&B(h.target,h.eventType,h.handler,!1,h.type),A.del(h))},G=function(a,b,c,d,e){var h,i=b.replace(g,""),j=b.replace(f,"").split(".");if(A.has(a,i,c))return a;i==="unload"&&(c=E(F,a,i,c,d)),w[i]&&(w[i].condition&&(c=D(a,c,i,w[i].condition,e,!0)),i=w[i].base||i),h=A.put(new z(a,i,c,d,j[0]&&j)),h.handler=h.isNative?C(a,h.handler,e):D(a,h.handler,i,!1,e,!1),h.eventSupport&&B(h.target,h.eventType,h.handler,!0,h.customType)},H=function(a,b,c){var d=function(b,d){var e,f=typeof a=="string"?c(a,d):a;for(;b&&b!==d;b=b.parentNode)for(e=f.length;e--;)if(f[e]===b)return b},e=function(a){var c=d(a.target,this);c&&b.apply(c,arguments)};return e.__beanDel={ft:d,selector:a,$:c},e},I=function(a,b,c){var d,e,h,i,j,k=F,l=b&&typeof b=="string";if(l&&b.indexOf(" ")>0){b=b.split(" ");for(j=b.length;j--;)I(a,b[j],c);return a}h=l&&b.replace(g,""),h&&w[h]&&(h=w[h].type);if(!b||l){if(i=l&&b.replace(f,""))i=i.split(".");k(a,h,c,i)}else if(typeof b=="function")k(a,null,b);else for(d in b)b.hasOwnProperty(d)&&I(a,d,b[d]);return a},J=function(a,b,c,d,e){var f,g,h,i,j=c,k=c&&typeof c=="string";if(b&&!c&&typeof b=="object")for(f in b)b.hasOwnProperty(f)&&J.apply(this,[a,f,b[f]]);else{i=arguments.length>3?p.call(arguments,3):[],g=(k?c:b).split(" "),k&&(c=H(b,j=d,e))&&(i=p.call(i,1)),this===u&&(c=E(I,a,b,c,j));for(h=g.length;h--;)G(a,g[h],c,j,i)}return a},K=function(){return J.apply(u,arguments)},L=n?function(a,b,d){var e=l.createEvent(a?"HTMLEvents":"UIEvents");e[a?"initEvent":"initUIEvent"](b,!0,!0,c,1),d.dispatchEvent(e)}:function(a,b,c){c=y(c,a),a?c.fireEvent("on"+b,l.createEventObject()):c["_on"+b]++},M=function(a,b,c){var d,e,h,i,j,k=b.split(" ");for(d=k.length;d--;){b=k[d].replace(g,"");if(i=k[d].replace(f,""))i=i.split(".");if(!i&&!c&&a[o])L(v[b],b,a);else{j=A.get(a,b),c=[!1].concat(c);for(e=0,h=j.length;e<h;e++)j[e].inNamespaces(i)&&j[e].handler.apply(a,c)}}return a},N=function(a,b,c){var d=0,e=A.get(b,c),f=e.length,g,h;for(;d<f;d++)e[d].original&&(h=e[d].handler.__beanDel,h?g=[a,h.selector,e[d].type,e[d].original,h.$]:g=[a,e[d].type,e[d].original],J.apply(null,g));return a},O={add:J,one:K,remove:I,clone:N,fire:M,noConflict:function(){return b[a]=d,this}};if(c[i]){var P=function(){var a,b=A.entries();for(a in b)b[a].type&&b[a].type!=="unload"&&I(b[a].element,b[a].type);c[k]("onunload",P),c.CollectGarbage&&c.CollectGarbage()};c[i]("onunload",P)}return O}),provide("bean",a.exports),!function(a){var b=require("bean"),c=function(c,d,e){var f=d?[d]:[];return function(){for(var e,g=0,h=this.length;g<h;g++)e=[this[g]].concat(f,Array.prototype.slice.call(arguments,0)),e.length==4&&e.push(a),!arguments.length&&c=="add"&&d&&(c="fire"),b[c].apply(this,e);return this}},d=c("add"),e=c("remove"),f=c("fire"),g={on:d,addListener:d,bind:d,listen:d,delegate:d,one:c("one"),off:e,unbind:e,unlisten:e,removeListener:e,undelegate:e,emit:f,trigger:f,cloneEvents:c("clone"),hover:function(a,c,d){for(d=this.length;d--;)b.add.call(this,this[d],"mouseenter",a),b.add.call(this,this[d],"mouseleave",c);return this}},h=["blur","change","click","dblclick","error","focus","focusin","focusout","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mouseout","mouseover","mouseup","mousemove","resize","scroll","select","submit","unload"];for(var i=h.length;i--;)g[h[i]]=c("add",h[i]);a.ender(g,!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;
+/*!
+    * Bonzo: DOM Utility (c) Dustin Diaz 2012
+    * https://github.com/ded/bonzo
+    * License MIT
+    */
+!function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"&&define.amd?define(b,c):this[b]=c()}("bonzo",function(){function G(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function H(a,b,c){for(var d=0,e=a.length;d<e;d++)b.call(c||a[d],a[d],d,a);return a}function I(a,b,c){for(var d=0,e=a.length;d<e;d++)O(a[d])&&(I(a[d].childNodes,b,c),b.call(c||a[d],a[d],d,a));return a}function J(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function K(a){return a?a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():a}function L(a){return a[y]("data-node-uid")||a[x]("data-node-uid",++t),uid=a[y]("data-node-uid"),s[uid]||(s[uid]={})}function M(a){uid=a[y]("data-node-uid"),uid&&delete s[uid]}function N(a,b){try{return a===null||a===undefined?undefined:a==="true"?!0:a==="false"?!1:a==="null"?null:(b=parseFloat(a))==a?b:a}catch(c){}return undefined}function O(a){return a&&a.nodeName&&a.nodeType==1}function P(a,b,c,d,e){for(d=0,e=a.length;d<e;++d)if(b.call(c,a[d],d,a))return!0;return!1}function Q(a){return a=="transform"&&(a=A.transform)||/^transform-?[Oo]rigin$/.test(a)&&(a=A.transform+"Origin")||a=="float"&&(a=A.cssFloat),a?J(a):null}function S(a,b,c){var d=0,g=b||this,h=[],i=f&&typeof a=="string"&&a.charAt(0)!="<"?f(a):a;return H(W(i),function(a){H(g,function(b){var f=!b[e]||b[e]&&!b[e][e]?function(){var a=b.cloneNode(!0);return g.$&&g.cloneEvents&&g.$(a).cloneEvents(b),a}():b;c(a,f),h[d]=f,d++})},this),H(h,function(a,b){g[b]=a}),g.length=d,g}function T(a,b,c){var d=$(a),e=d.css("position"),f=d.offset(),g="relative",h=e==g,i=[parseInt(d.css("left"),10),parseInt(d.css("top"),10)];e=="static"&&(d.css("position",g),e=g),isNaN(i[0])&&(i[0]=h?0:a.offsetLeft),isNaN(i[1])&&(i[1]=h?0:a.offsetTop),b!=null&&(a.style.left=b-f.left+i[0]+w),c!=null&&(a.style.top=c-f.top+i[1]+w)}function U(a,b){return typeof b=="function"?b(a):b}function V(a){this.length=0;if(a){a=typeof a!="string"&&!a.nodeType&&typeof a.length!="undefined"?a:[a],this.length=a.length;for(var b=0;b<a.length;b++)this[b]=a[b]}}function W(a){return typeof a=="string"?$.create(a):O(a)?[a]:a}function X(a,c,d){var e=this[0];return e?a==null&&c==null?(Y(e)?Z():{x:e.scrollLeft,y:e.scrollTop})[d]:(Y(e)?b.scrollTo(a,c):(a!=null&&(e.scrollLeft=a),c!=null&&(e.scrollTop=c)),this):this}function Y(a){return a===b||/^(?:body|html)$/i.test(a.tagName)}function Z(){return{x:b.pageXOffset||d.scrollLeft,y:b.pageYOffset||d.scrollTop}}function $(a,b){return new V(a,b)}var a=this,b=window,c=b.document,d=c.documentElement,e="parentNode",f=null,g=/^(checked|value|selected)$/i,h=/^(select|fieldset|table|tbody|tfoot|td|tr|colgroup)$/i,i=["<table>","</table>",1],j=["<table><tbody><tr>","</tr></tbody></table>",3],k=["<select>","</select>",1],l=["_","",0,1],m={thead:i,tbody:i,tfoot:i,colgroup:i,caption:i,tr:["<table><tbody>","</tbody></table>",2],th:j,td:j,col:["<table><colgroup>","</colgroup></table>",2],fieldset:["<form>","</form>",1],legend:["<form><fieldset>","</fieldset></form>",2],option:k,optgroup:k,script:l,style:l,link:l,param:l,base:l},n=/^(checked|selected)$/,o=/msie/i.test(navigator.userAgent),p,q,r,s={},t=0,u=/^-?[\d\.]+$/,v=/^data-(.+)$/,w="px",x="setAttribute",y="getAttribute",z="getElementsByTagName",A=function(){var a=c.createElement("p");return a.innerHTML='<a href="#x">x</a><table style="float:left;"></table>',{hrefExtended:a[z]("a")[0][y]("href")!="#x",autoTbody:a[z]("tbody").length!==0,computedStyle:c.defaultView&&c.defaultView.getComputedStyle,cssFloat:a[z]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var b=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],c;for(c=0;c<b.length;c++)if(b[c]in a.style)return b[c]}(),classList:"classList"in a}}(),B=/(^\s*|\s*$)/g,C=/\s+/,D=String.prototype.toString,E={lineHeight:1,zoom:1,zIndex:1,opacity:1},F=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(B,"")},R=A.computedStyle?function(a,b){var d=null,e=c.defaultView.getComputedStyle(a,"");return e&&(d=e[b]),a.style[b]||d}:o&&d.currentStyle?function(a,b){if(b=="opacity"){var c=100;try{c=a.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(d){try{c=a.filters("alpha").opacity}catch(e){}}return c/100}var f=a.currentStyle?a.currentStyle[b]:null;return a.style[b]||f}:function(a,b){return a.style[b]};return A.classList?(p=function(a,b){return a.classList.contains(b)},q=function(a,b){a.classList.add(b)},r=function(a,b){a.classList.remove(b)}):(p=function(a,b){return G(b).test(a.className)},q=function(a,b){a.className=F(a.className+" "+b)},r=function(a,b){a.className=F(a.className.replace(G(b)," "))}),V.prototype={get:function(a){return this[a]||null},each:function(a,b){return H(this,a,b)},deepEach:function(a,b){return I(this,a,b)},map:function(a,b){var c=[],d,e;for(e=0;e<this.length;e++)d=a.call(this,this[e],e),b?b(d)&&c.push(d):c.push(d);return c},html:function(a,b){function e(b){H(W(a),function(a){b.appendChild(a)})}var c=b?d.textContent===undefined?"innerText":"textContent":"innerHTML";return typeof a!="undefined"?this.empty().each(function(d){!b&&h.test(d.tagName)?e(d):!function(){try{d[c]=a}catch(b){e(d)}}()}):this[0]?this[0][c]:""},text:function(a){return this.html(a,1)},append:function(a){return this.each(function(b){H(W(a),function(a){b.appendChild(a)})})},prepend:function(a){return this.each(function(b){var c=b.firstChild;H(W(a),function(a){b.insertBefore(a,c)})})},appendTo:function(a,b){return S.call(this,a,b,function(a,b){a.appendChild(b)})},prependTo:function(a,b){return S.call(this,a,b,function(a,b){a.insertBefore(b,a.firstChild)})},before:function(a){return this.each(function(b){H($.create(a),function(a){b[e].insertBefore(a,b)})})},after:function(a){return this.each(function(b){H($.create(a),function(a){b[e].insertBefore(a,b.nextSibling)})})},insertBefore:function(a,b){return S.call(this,a,b,function(a,b){a[e].insertBefore(b,a)})},insertAfter:function(a,b){return S.call(this,a,b,function(a,b){var c=a.nextSibling;c?a[e].insertBefore(b,c):a[e].appendChild(b)})},replaceWith:function(a){return this.deepEach(M),this.each(function(b){b.parentNode.replaceChild($.create(a)[0],b)})},addClass:function(a){return a=D.call(a).split(C),this.each(function(b){H(a,function(a){a&&!p(b,U(b,a))&&q(b,U(b,a))})})},removeClass:function(a){return a=D.call(a).split(C),this.each(function(b){H(a,function(a){a&&p(b,U(b,a))&&r(b,U(b,a))})})},hasClass:function(a){return a=D.call(a).split(C),P(this,function(b){return P(a,function(a){return a&&p(b,a)})})},toggleClass:function(a,b){return a=D.call(a).split(C),this.each(function(c){H(a,function(a){a&&(typeof b!="undefined"?b?q(c,a):r(c,a):p(c,a)?r(c,a):q(c,a))})})},show:function(a){return this.each(function(b){b.style.display=a||""})},hide:function(){return this.each(function(a){a.style.display="none"})},toggle:function(a,b){return this.each(function(a){a.style.display=a.offsetWidth||a.offsetHeight?"none":b||""}),a&&a(),this},first:function(){return $(this.length?this[0]:[])},last:function(){return $(this.length?this[this.length-1]:[])},next:function(){return this.related("nextSibling")},previous:function(){return this.related("previousSibling")},parent:function(){return this.related(e)},related:function(a){return this.map(function(b){b=b[a];while(b&&b.nodeType!==1)b=b[a];return b||0},function(a){return a})},focus:function(){return this.length&&this[0].focus(),this},blur:function(){return this.each(function(a){a.blur()})},css:function(a,d,e){function g(a,b,c){for(var d in f)f.hasOwnProperty(d)&&(c=f[d],(b=Q(d))&&u.test(c)&&!(b in E)&&(c+=w),a.style[b]=U(a,c))}if(d===undefined&&typeof a=="string")return d=this[0],d?d===c||d===b?(e=d===c?$.doc():$.viewport(),a=="width"?e.width:a=="height"?e.height:""):(a=Q(a))?R(d,a):null:null;var f=a;return typeof a=="string"&&(f={},f[a]=d),o&&f.opacity&&(f.filter="alpha(opacity="+f.opacity*100+")",f.zoom=a.zoom||1,delete f.opacity),this.each(g)},offset:function(a,b){if(typeof a=="number"||typeof b=="number")return this.each(function(c){T(c,a,b)});if(!this[0])return{top:0,left:0,height:0,width:0};var c=this[0],d=c.offsetWidth,e=c.offsetHeight,f=c.offsetTop,g=c.offsetLeft;while(c=c.offsetParent)f+=c.offsetTop,g+=c.offsetLeft;return{top:f,left:g,height:e,width:d}},dim:function(){if(!this.length)return{height:0,width:0};var a=this[0],b=!a.offsetWidth&&!a.offsetHeight?function(b,c){return c={position:a.style.position||"",visibility:a.style.visibility||"",display:a.style.display||""},b.first().css({position:"absolute",visibility:"hidden",display:"block"}),c}(this):null,c=a.offsetWidth,d=a.offsetHeight;return b&&this.first().css(b),{height:d,width:c}},attr:function(a,b){var c=this[0];if(typeof a=="string"||a instanceof String)return typeof b=="undefined"?c?g.test(a)?n.test(a)&&typeof c[a]=="string"?!0:c[a]:a!="href"&&a!="src"||!A.hrefExtended?c[y](a):c[y](a,2):null:this.each(function(c){g.test(a)?c[a]=U(c,b):c[x](a,U(c,b))});for(var d in a)a.hasOwnProperty(d)&&this.attr(d,a[d]);return this},removeAttr:function(a){return this.each(function(b){n.test(a)?b[a]=!1:b.removeAttribute(a)})},val:function(a){return typeof a=="string"?this.attr("value",a):this.length?this[0].value:null},data:function(a,b){var c=this[0],d,e,f;return typeof b=="undefined"?c?(e=L(c),typeof a=="undefined"?(H(c.attributes,function(a){(f=(""+a.name).match(v))&&(e[J(f[1])]=N(a.value))}),e):(typeof e[a]=="undefined"&&(e[a]=N(this.attr("data-"+K(a)))),e[a])):null:this.each(function(c){L(c)[a]=b})},remove:function(){return this.deepEach(M),this.each(function(a){a[e]&&a[e].removeChild(a)})},empty:function(){return this.each(function(a){I(a.childNodes,M);while(a.firstChild)a.removeChild(a.firstChild)})},detach:function(){return this.map(function(a){return a[e].removeChild(a)})},scrollTop:function(a){return X.call(this,null,a,"y")},scrollLeft:function(a){return X.call(this,a,null,"x")}},$.setQueryEngine=function(a){f=a,delete $.setQueryEngine},$.aug=function(a,b){for(var c in a)a.hasOwnProperty(c)&&((b||V.prototype)[c]=a[c])},$.create=function(a){return typeof a=="string"&&a!==""?function(){var b=/^\s*<([^\s>]+)/.exec(a),d=c.createElement("div"),f=[],g=b?m[b[1].toLowerCase()]:null,h=g?g[2]+1:1,i=g&&g[3],j=e,k=A.autoTbody&&g&&g[0]=="<table>"&&!/<tbody/i.test(a);d.innerHTML=g?g[0]+a+g[1]:a;while(h--)d=d.firstChild;i&&d&&d.nodeType!==1&&(d=d.nextSibling);do(!b||d.nodeType==1)&&(!k||d.tagName.toLowerCase()!="tbody")&&f.push(d);while(d=d.nextSibling);return H(f,function(a){a[j]&&a[j].removeChild(a)}),f}():O(a)?[a.cloneNode(!0)]:[]},$.doc=function(){var a=$.viewport();return{width:Math.max(c.body.scrollWidth,d.scrollWidth,a.width),height:Math.max(c.body.scrollHeight,d.scrollHeight,a.height)}},$.firstChild=function(a){for(var b=a.childNodes,c=0,d=b&&b.length||0,e;c<d;c++)b[c].nodeType===1&&(e=b[d=c]);return e},$.viewport=function(){return{width:o?d.clientWidth:self.innerWidth,height:o?d.clientHeight:self.innerHeight}},$.isAncestor="compareDocumentPosition"in d?function(a,b){return(a.compareDocumentPosition(b)&16)==16}:"contains"in d?function(a,b){return a!==b&&a.contains(b)}:function(a,b){while(b=b[e])if(b===a)return!0;return!1},$}),provide("bonzo",a.exports),!function(a){function c(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function d(a){var b=[],c=0,d=0,e,f,g;for(;f=a[c];++c){g=!1;for(e=0;e<b.length;++e)if(b[e]===f){g=!0;break}g||(b[d++]=f)}return b}function e(a,c){return typeof c=="undefined"?b(this).dim()[a]:this.css(a,c)}var b=require("bonzo");b.setQueryEngine(a),a.ender(b),a.ender(b(),!0),a.ender({create:function(c){return a(b.create(c))}}),a.id=function(b){return a([document.getElementById(b)])},a.ender({parents:function(b,e){if(!this.length)return this;var f=a(b),g,h,i,j=[];for(g=0,h=this.length;g<h;g++){i=this[g];while(i=i.parentNode)if(~c(f,i)){j.push(i);if(e)break}}return a(d(j))},parent:function(){return a(d(b(this).parent()))},closest:function(a){return this.parents(a,!0)},first:function(){return a(this.length?this[0]:this)},last:function(){return a(this.length?this[this.length-1]:[])},next:function(){return a(b(this).next())},previous:function(){return a(b(this).previous())},appendTo:function(a){return b(this.selector).appendTo(a,this)},prependTo:function(a){return b(this.selector).prependTo(a,this)},insertAfter:function(a){return b(this.selector).insertAfter(a,this)},insertBefore:function(a){return b(this.selector).insertBefore(a,this)},siblings:function(){var b,c,d,e=[];for(b=0,c=this.length;b<c;b++){d=this[b];while(d=d.previousSibling)d.nodeType==1&&e.push(d);d=this[b];while(d=d.nextSibling)d.nodeType==1&&e.push(d)}return a(e)},children:function(){var c,e,f=[];for(c=0,l=this.length;c<l;c++){if(!(e=b.firstChild(this[c])))continue;f.push(e);while(e=e.nextSibling)e.nodeType==1&&f.push(e)}return a(d(f))},height:function(a){return e.call(this,"height",a)},width:function(a){return e.call(this,"width",a)}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;
+/*!
+    * domready (c) Dustin Diaz 2012 - License MIT
+    */
+!function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"&&typeof define.amd=="object"?define(c):this[b]=c()}("domready",function(a){function m(a){l=1;while(a=b.shift())a()}var b=[],c,d=!1,e=document,f=e.documentElement,g=f.doScroll,h="DOMContentLoaded",i="addEventListener",j="onreadystatechange",k="readyState",l=/^loade|c/.test(e[k]);return e[i]&&e[i](h,c=function(){e.removeEventListener(h,c,d),m()},d),g&&e.attachEvent(j,c=function(){/^c/.test(e[k])&&(e.detachEvent(j,c),m())}),a=g?function(c){self!=top?l?c():b.push(c):function(){try{f.doScroll("left")}catch(b){return setTimeout(function(){a(c)},50)}c()}()}:function(a){l?a():b.push(a)}}),provide("domready",a.exports),!function(a){var b=require("domready");a.ender({domReady:b}),a.ender({ready:function(a){return b(a),this}},!0)}(ender)}(),!function(){var a={exports:{}},b=a.exports;
+/*!
+    * Qwery - A Blazing Fast query selector engine
+    * https://github.com/ded/qwery
+    * copyright Dustin Diaz & Jacob Thornton 2011
+    * MIT License
+    */
+!function(b,c){typeof a!="undefined"?a.exports=c():typeof define=="function"&&typeof define.amd=="object"?define(c):this[b]=c()}("qwery",function(){function C(){this.c={}}function H(a){return D.g(a)||D.s(a,"(^|\\s+)"+a+"(\\s+|$)",1)}function I(a,b){var c=0,d=a.length;for(;c<d;c++)b(a[c])}function J(a){for(var b=[],c=0,d=a.length;c<d;++c)V(a[c])?b=b.concat(a[c]):b[b.length]=a[c];return b}function K(a){var b=0,c=a.length,d=[];for(;b<c;b++)d[b]=a[b];return d}function L(a){while(a=a.previousSibling)if(a[h]==1)break;return a}function M(a){return a.match(A)}function N(a,b,c,d,e,f,i,l,m,n,o){var p,q,r,s,t;if(this[h]!==1)return!1;if(b&&b!=="*"&&this[g]&&this[g].toLowerCase()!==b)return!1;if(c&&(q=c.match(j))&&q[1]!==this.id)return!1;if(c&&(t=c.match(k)))for(p=t.length;p--;)if(!H(t[p].slice(1)).test(this.className))return!1;if(m&&Y.pseudos[m]&&!Y.pseudos[m](this,o))return!1;if(d&&!i){s=this.attributes;for(r in s)if(Object.prototype.hasOwnProperty.call(s,r)&&(s[r].name||r)==e)return this}return d&&!P(f,_(this,e)||"",i)?!1:this}function O(a){return E.g(a)||E.s(a,a.replace(t,"\\$1"))}function P(a,b,c){switch(a){case"=":return b==c;case"^=":return b.match(F.g("^="+c)||F.s("^="+c,"^"+O(c),1));case"$=":return b.match(F.g("$="+c)||F.s("$="+c,O(c)+"$",1));case"*=":return b.match(F.g(c)||F.s(c,O(c),1));case"~=":return b.match(F.g("~="+c)||F.s("~="+c,"(?:^|\\s+)"+O(c)+"(?:\\s+|$)",1));case"|=":return b.match(F.g("|="+c)||F.s("|="+c,"^"+O(c)+"(-|$)",1))}return 0}function Q(a,b){var c=[],e=[],f,i,j,k,m,n,o,p,q=b,r=G.g(a)||G.s(a,a.split(z)),s=a.match(y);if(!r.length)return c;k=(r=r.slice(0)).pop(),r.length&&(j=r[r.length-1].match(l))&&(q=X(b,j[1]));if(!q)return c;o=M(k),n=q!==b&&q[h]!==9&&s&&/^[+~]$/.test(s[s.length-1])?function(a){while(q=q.nextSibling)q[h]==1&&(o[1]?o[1]==q[g].toLowerCase():1)&&(a[a.length]=q);return a}([]):q[d](o[1]||"*");for(f=0,i=n.length;f<i;f++)if(p=N.apply(n[f],o))c[c.length]=p;return r.length?(I(c,function(a){S(a,r,s)&&(e[e.length]=a)}),e):c}function R(a,b,c){if(T(b))return a==b;if(V(b))return!!~J(b).indexOf(a);var d=b.split(","),e,f;while(b=d.pop()){e=G.g(b)||G.s(b,b.split(z)),f=b.match(y),e=e.slice(0);if(N.apply(a,M(e.pop()))&&(!e.length||S(a,e,f,c)))return!0}return!1}function S(a,b,c,d){function f(a,d,g){while(g=B[c[d]](g,a))if(T(g)&&N.apply(g,M(b[d]))){if(!d)return g;if(e=f(g,d-1,g))return e}}var e;return(e=f(a,b.length-1,a))&&(!d||$(e,d))}function T(a,b){return a&&typeof a=="object"&&(b=a[h])&&(b==1||b==9)}function U(a){var b=[],c,d;a:for(c=0;c<a.length;++c){for(d=0;d<b.length;++d)if(b[d]==a[c])continue a;b[b.length]=a[c]}return b}function V(a){return typeof a=="object"&&isFinite(a.length)}function W(b){return b?typeof b=="string"?Y(b)[0]:!b[h]&&V(b)?b[0]:b:a}function X(a,b,c){return a[h]===9?a.getElementById(b):a.ownerDocument&&((c=a.ownerDocument.getElementById(b))&&$(c,a)&&c||!$(a,a.ownerDocument)&&i('[id="'+b+'"]',a)[0])}function Y(a,b){var e,f,g=W(b);if(!g||!a)return[];if(a===window||T(a))return!b||a!==window&&T(g)&&$(a,g)?[a]:[];if(a&&V(a))return J(a);if(e=a.match(x)){if(e[1])return(f=X(g,e[1]))?[f]:[];if(e[2])return K(g[d](e[2]));if(ba&&e[3])return K(g[c](e[3]))}return i(a,g)}function Z(a,b){return function(c){var d,e;if(p.test(c)){a[h]!==9&&((e=d=a.getAttribute("id"))||a.setAttribute("id",e="__qwerymeupscotty"),c='[id="'+e+'"]'+c,b(a.parentNode||a,c,!0),d||a.removeAttribute("id"));return}c.length&&b(a,c,!1)}}var a=document,b=a.documentElement,c="getElementsByClassName",d="getElementsByTagName",e="querySelectorAll",f="useNativeQSA",g="tagName",h="nodeType",i,j=/#([\w\-]+)/,k=/\.[\w\-]+/g,l=/^#([\w\-]+)$/,m=/^\.([\w\-]+)$/,n=/^([\w\-]+)$/,o=/^([\w]+)?\.([\w\-]+)$/,p=/(^|,)\s*[>~+]/,q=/^\s+|\s*([,\s\+\~>]|$)\s*/g,r=/[\s\>\+\~]/,s=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,t=/([.*+?\^=!:${}()|\[\]\/\\])/g,u=/^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,v=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,w=/:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/,x=new RegExp(l.source+"|"+n.source+"|"+m.source),y=new RegExp("("+r.source+")"+s.source,"g"),z=new RegExp(r.source+s.source),A=new RegExp(u.source+"("+v.source+")?"+"("+w.source+")?"),B={" ":function(a){return a&&a!==b&&a.parentNode},">":function(a,b){return a&&a.parentNode==b.parentNode&&a.parentNode},"~":function(a){return a&&a.previousSibling},"+":function(a,b,c,d){return a?(c=L(a))&&(d=L(b))&&c==d&&c:!1}};C.prototype={g:function(a){return this.c[a]||undefined},s:function(a,b,c){return b=c?new RegExp(b):b,this.c[a]=b}};var D=new C,E=new C,F=new C,G=new C,$="compareDocumentPosition"in b?function(a,b){return(b.compareDocumentPosition(a)&16)==16}:"contains"in b?function(a,c){return c=c[h]===9||c==window?b:c,c!==a&&c.contains(a)}:function(a,b){while(a=a.parentNode)if(a===b)return 1;return 0},_=function(){var b=a.createElement("p");return(b.innerHTML='<a href="#x">x</a>')&&b.firstChild.getAttribute("href")!="#x"?function(a,b){return b==="class"?a.className:b==="href"||b==="src"?a.getAttribute(b,2):a.getAttribute(b)}:function(a,b){return a.getAttribute(b)}}(),ba=!!a[c],bb=a.querySelector&&a[e],bc=function(a,b){var c=[],d,f;try{return b[h]===9||!p.test(a)?K(b[e](a)):(I(d=a.split(","),Z(b,function(a,b){f=a[e](b),f.length==1?c[c.length]=f.item(0):f.length&&(c=c.concat(K(f)))})),d.length>1&&c.length>1?U(c):c)}catch(g){}return bd(a,b)},bd=function(a,b){var c=[],e,f,g,i,j,k;a=a.replace(q,"$1");if(f=a.match(o)){j=H(f[2]),e=b[d](f[1]||"*");for(g=0,i=e.length;g<i;g++)j.test(e[g].className)&&(c[c.length]=e[g]);return c}return I(k=a.split(","),Z(b,function(a,d,e){j=Q(d,a);for(g=0,i=j.length;g<i;g++)if(a[h]===9||e||$(j[g],b))c[c.length]=j[g]})),k.length>1&&c.length>1?U(c):c},be=function(a){typeof a[f]!="undefined"&&(i=a[f]?bb?bc:bd:bd)};return be({useNativeQSA:!0}),Y.configure=be,Y.uniq=U,Y.is=R,Y.pseudos={},Y}),provide("qwery",a.exports),!function(a,b){var c=require("qwery");b.pseudos=c.pseudos,b._select=function(a,d){return(b._select=function(a){try{return a=require("bonzo"),function(b,d){return/^\s*</.test(b)?a.create(b,d):c(b,d)}}catch(b){}return c}())(a,d)},b.ender({find:function(a){var d=[],e,f,g,h,i;for(e=0,f=this.length;e<f;e++){i=c(a,this[e]);for(g=0,h=i.length;g<h;g++)d.push(i[g])}return b(c.uniq(d))},and:function(a){var c=b(a);for(var d=this.length,e=0,f=this.length+c.length;d<f;d++,e++)this[d]=c[e];return this},is:function(a,b){var d,e;for(d=0,e=this.length;d<e;d++)if(c.is(this[d],a,b))return!0;return!1}},!0)}(document,ender)}()
\ No newline at end of file
diff --git a/inst/reveal.js-3.3.0/plugin/menu/menu.css b/inst/reveal.js-3.3.0/plugin/menu/menu.css
new file mode 100755
index 0000000..274b55c
--- /dev/null
+++ b/inst/reveal.js-3.3.0/plugin/menu/menu.css
@@ -0,0 +1,269 @@
+.reveal .slide-menu {
+	background-color: #333;
+	z-index: 200;
+	position: fixed;
+	top: 0;
+	width: 300px;
+	height: 100%;
+	/*overflow-y: scroll;*/
+	transition: transform 0.3s;
+  	font-size: 16px;
+  	font-weight: normal;
+}
+
+/*
+ * Slides menu
+ */
+
+.reveal .slide-menu-items {
+	margin: 0;
+	padding: 0;
+	width: 100%;
+	border-bottom: solid 1px #555;
+}
+
+.reveal .slide-menu-item, 
+.reveal .slide-menu-item-vertical {
+	display: block;
+	text-align: left;
+	padding: 10px 18px;
+	color: #aaa;
+	cursor: pointer;
+}
+
+.reveal .slide-menu-item-vertical {
+	padding-left: 30px;
+}
+
+.reveal .slide-menu-item {
+  border-top: solid 1px #555;
+}
+
+.reveal .active-menu-panel li.selected {
+	background-color: #222;
+	color: white;
+}
+
+.reveal .active-menu-panel li.active {
+	color: #eee;
+}
+
+.reveal .slide-menu-item.no-title .slide-menu-item-title, 
+.reveal .slide-menu-item-vertical.no-title .slide-menu-item-title {
+	font-style: italic;
+}
+
+.reveal .slide-menu-item-number {
+	color: #999;
+	padding-right:6px;
+}
+
+.reveal .slide-menu-item i.fa,
+.reveal .slide-menu-item-vertical i.fa {
+	padding-right: 12px;
+	display: none;
+}
+
+.reveal .slide-menu-item.past i.fa.past,
+.reveal .slide-menu-item-vertical.past i.fa.past,
+.reveal .slide-menu-item.active i.fa.active,
+.reveal .slide-menu-item-vertical.active i.fa.active,
+.reveal .slide-menu-item.future i.fa.future,
+.reveal .slide-menu-item-vertical.future i.fa.future {
+	display: inline-block;
+}
+
+.reveal .slide-menu-item i.fa,
+.reveal .slide-menu-item-vertical i.fa {
+	opacity: 0.4;
+}
+
+.reveal .slide-menu--left {
+  left: 0;
+  -webkit-transform: translateX(-300px);
+  -ms-transform: translateX(-300px);
+  transform: translateX(-300px);
+}
+
+.reveal .slide-menu--left.active {
+  -webkit-transform: translateX(0);
+  -ms-transform: translateX(0);
+  transform: translateX(0);
+}
+
+.reveal .slide-menu--right {
+  right: 0;
+  -webkit-transform: translateX(300px);
+  -ms-transform: translateX(300px);
+  transform: translateX(300px);
+}
+
+.reveal .slide-menu--right.active {
+  -webkit-transform: translateX(0);
+  -ms-transform: translateX(0);
+  transform: translateX(0);
+}
+
+.reveal {
+	transition: transform 0.3s;
+}
+
+
+/*
+ * Toolbar
+ */
+.reveal .slide-menu-toolbar {
+ 	height: 60px;
+ 	width: 100%;
+ 	font-size: 12px;
+    display: table;
+    table-layout: fixed; /* ensures equal width */
+    margin: 0;
+    padding: 0;
+	border-bottom: solid 2px #666;
+}
+
+.reveal .slide-menu-toolbar > li {
+    display: table-cell;
+ 	line-height: 150%;
+    text-align: center;
+    vertical-align: middle;
+    cursor: pointer;
+	color: #aaa;
+	border-radius: 3px;
+}
+
+.reveal .slide-menu-toolbar > li.active-toolbar-button {
+ 	color: white;
+ 	text-shadow: 0 1px black;	
+}
+
+.slide-menu-toolbar > li:hover {
+	color: white;
+}
+
+/*
+ * Panels
+ */
+.reveal .slide-menu-panel {
+	position: absolute;
+	width: 100%;
+	visibility: hidden;
+	height: calc(100% - 60px);
+	overflow-x: hidden;
+	overflow-y: auto;
+	color: #AAA;
+}
+
+.reveal .slide-menu-panel.active-menu-panel {
+	visibility: visible;
+}
+
+.reveal .slide-menu-panel h1,
+.reveal .slide-menu-panel h2,
+.reveal .slide-menu-panel h3,
+.reveal .slide-menu-panel h4,
+.reveal .slide-menu-panel h5,
+.reveal .slide-menu-panel h6 {
+	margin: 20px 0 10px 0;
+	color: #FFF;
+	line-height: 1.2;
+	letter-spacing: normal;
+	text-shadow: none;
+}
+
+.reveal .slide-menu-panel h1 {
+	font-size: 1.6em;
+}
+.reveal .slide-menu-panel h2 {
+	font-size: 1.4em;
+}
+.reveal .slide-menu-panel h3 {
+	font-size: 1.3em;
+}
+.reveal .slide-menu-panel h4 {
+	font-size: 1.1em;
+}
+.reveal .slide-menu-panel h5 {
+	font-size: 1em;
+}
+.reveal .slide-menu-panel h6 {
+	font-size: 0.9em;
+}
+
+.reveal .slide-menu-panel p {
+	margin: 10px 0 5px 0;
+}
+
+.reveal .slide-menu-panel a {
+	color: #CCC;
+	text-decoration: underline;
+}
+
+.reveal .slide-menu-panel a:hover {
+	color: white;
+}
+
+.reveal .slide-menu-item a {
+	text-decoration: none;
+}
+
+.reveal .slide-menu-custom-panel {
+	width: calc(100% - 20px);
+	padding-left: 10px;
+	padding-right: 10px;
+}
+
+.reveal .slide-menu-custom-panel .slide-menu-items {
+	width: calc(100% + 20px);
+	margin-left: -10px;
+	margin-right: 10px;
+}
+
+ 
+/*
+ * Theme and Transitions buttons
+ */
+
+.reveal div[data-panel="Themes"] li,
+.reveal div[data-panel="Transitions"] li {
+	display: block;
+	text-align: left;
+	cursor: pointer;
+	color: #848484;
+}
+
+/*
+ * Menu controls
+ */
+.reveal .slide-menu-button {
+	position: fixed;
+	left: 30px;
+	bottom: 30px;
+	z-index: 30;
+	font-size: 24px;
+}
+
+/*
+ * Menu overlay
+ */
+
+.reveal .slide-menu-overlay {
+  position: fixed;
+  z-index: 199;
+  top: 0;
+  left: 0;
+  overflow: hidden;
+  width: 0;
+  height: 0;
+  background-color: #000;
+  opacity: 0;
+  transition: opacity 0.3s, width 0s 0.3s, height 0s 0.3s;
+}
+
+.reveal .slide-menu-overlay.active {
+  width: 100%;
+  height: 100%;
+  opacity: 0.7;
+  transition: opacity 0.3s;
+}
diff --git a/inst/reveal.js-3.3.0/plugin/menu/menu.js b/inst/reveal.js-3.3.0/plugin/menu/menu.js
new file mode 100755
index 0000000..65f05ee
--- /dev/null
+++ b/inst/reveal.js-3.3.0/plugin/menu/menu.js
@@ -0,0 +1,715 @@
+/*
+ * Reveal.js menu plugin
+ * MIT licensed
+ * (c) Greg Denehy 2015
+ */
+
+var RevealMenu = window.RevealMenu || (function(){
+	var config = Reveal.getConfig();
+	var options = config.menu || {};
+	options.path = options.path || scriptPath() || 'plugin/menu';
+
+	var module = {};
+
+	loadResource(options.path + '/lib/jeesh.min.js', 'script', function() {
+	loadResource(options.path + '/lib/bowser.min.js', 'script', function() {
+	loadResource(options.path + '/menu.css', 'stylesheet', function() {
+		// does not support IE8 or below
+		if (!bowser.msie || bowser.version >= 9) {
+			//
+			// Set option defaults
+			//
+			var side = options.side || 'left';	// 'left' or 'right'
+			var numbers = options.numbers || false;
+			var titleSelector = 'h1, h2, h3, h4, h5';
+			if (typeof options.titleSelector === 'string') titleSelector = options.titleSelector;
+			var hideMissingTitles = options.hideMissingTitles || false;
+			var markers = options.markers || false;
+			var custom = options.custom;
+			var themes = options.themes;
+			if (typeof themes === "undefined") {
+				themes = [
+					{ name: 'Black', theme: 'css/theme/black.css' },
+					{ name: 'White', theme: 'css/theme/white.css' },
+					{ name: 'League', theme: 'css/theme/league.css' },
+					{ name: 'Sky', theme: 'css/theme/sky.css' },
+					{ name: 'Beige', theme: 'css/theme/beige.css' },
+					{ name: 'Simple', theme: 'css/theme/simple.css' },
+					{ name: 'Serif', theme: 'css/theme/serif.css' },
+					{ name: 'Blood', theme: 'css/theme/blood.css' },
+					{ name: 'Night', theme: 'css/theme/night.css' },
+					{ name: 'Moon', theme: 'css/theme/moon.css' },
+					{ name: 'Solarized', theme: 'css/theme/solarized.css' }
+				];
+			}
+			var transitions = options.transitions;
+			if (typeof transitions === "undefined") transitions = true;
+			if (bowser.msie && bowser.version <= 9) {
+				// transitions aren't support in IE9 anyway, so no point in showing them
+				transitions = false;
+			}
+			var openButton = options.openButton;
+			if (typeof openButton === "undefined") openButton = true;
+			var openSlideNumber = options.openSlideNumber;
+			if (typeof openSlideNumber === "undefined") openSlideNumber = false;
+			var keyboard = options.keyboard;
+			if (typeof keyboard === "undefined") keyboard = true;
+
+			function disableMouseSelection() {
+				mouseSelectionEnabled = false;
+			}
+
+			function reenableMouseSelection() {
+				// wait until the mouse has moved before re-enabling mouse selection
+				// to avoid selections on scroll
+				$('nav.slide-menu').one('mousemove', function(event) {
+					//XXX this should select the item under the mouse
+					mouseSelectionEnabled = true;
+				});
+			}
+
+			//
+			// Keyboard handling
+			//
+			function getOffset(el) {
+				var _x = 0;
+				var _y = 0;
+				while(el && !isNaN(el.offsetLeft) && !isNaN(el.offsetTop)) {
+					_x += el.offsetLeft - el.scrollLeft;
+					_y += el.offsetTop - el.scrollTop;
+					el = el.offsetParent;
+				}
+				return { top: _y, left: _x };
+			}
+
+			function visibleOffset(el) {
+				var offsetFromTop = getOffset(el).top - el.offsetParent.offsetTop;
+				if (offsetFromTop < 0) return -offsetFromTop
+				var offsetFromBottom = el.offsetParent.offsetHeight - (el.offsetTop - el.offsetParent.scrollTop + el.offsetHeight);
+				if (offsetFromBottom < 0) return offsetFromBottom; 
+				return 0;
+			}
+
+			function keepVisible(el) {
+				var offset = visibleOffset(el);
+				if (offset) {
+					disableMouseSelection();
+					el.scrollIntoView(offset > 0);
+					reenableMouseSelection();	
+				}
+			}
+
+			function scrollItemToTop(el) {
+				disableMouseSelection();
+				el.offsetParent.scrollTop = el.offsetTop;
+				reenableMouseSelection();	
+			}
+
+			function scrollItemToBottom(el) {
+				disableMouseSelection();
+				el.offsetParent.scrollTop = el.offsetTop - el.offsetParent.offsetHeight + el.offsetHeight
+				reenableMouseSelection();	
+			}
+
+			function selectItem(el) {
+				$(el).addClass('selected');
+				keepVisible(el);
+			}
+
+			function onDocumentKeyDown(event) {
+				if (event.keyCode === 77) {
+					toggleMenu();
+				} else if (isOpen()) {
+					event.stopImmediatePropagation();
+					switch( event.keyCode ) {
+						// h, left - change panel
+						case 72: case 37:
+							prevPanel();
+							break;
+						// l, right - change panel
+						case 76: case 39:
+							nextPanel();
+							break;
+						// k, up
+						case 75: case 38:
+							var currItem = $('.active-menu-panel .slide-menu-items li.selected').get(0) || $('.active-menu-panel .slide-menu-items li.active').get(0);
+							if (currItem) {
+								$('.active-menu-panel .slide-menu-items li').removeClass('selected');
+								var nextItem = $('.active-menu-panel .slide-menu-items li[data-item="' + ($(currItem).data('item') - 1) + '"]').get(0) || currItem;
+								selectItem(nextItem);
+							} else {
+								var items = $('.active-menu-panel .slide-menu-items li.slide-menu-item');
+								if (items.length > 0) {
+									selectItem(items.get(0));
+								}
+							}
+							break;
+						// j, down
+						case 74: case 40:
+							var currItem = $('.active-menu-panel .slide-menu-items li.selected').get(0) || $('.active-menu-panel .slide-menu-items li.active').get(0);
+							if (currItem) {
+								$('.active-menu-panel .slide-menu-items li').removeClass('selected');
+								var nextItem = $('.active-menu-panel .slide-menu-items li[data-item="' + ($(currItem).data('item') + 1) + '"]').get(0) || currItem;
+								selectItem(nextItem);
+							} else {
+								var items = $('.active-menu-panel .slide-menu-items li.slide-menu-item');
+								if (items.length > 0) {
+									selectItem(items.get(0));
+								}
+							}
+							break;
+						// pageup, u
+						case 33: case 85:
+							var itemsAbove = $('.active-menu-panel .slide-menu-items li').filter(function(item) { return visibleOffset(item) > 0; });
+							var visibleItems = $('.active-menu-panel .slide-menu-items li').filter(function(item) { return visibleOffset(item) == 0; });
+
+							var firstVisible = (itemsAbove.length > 0 && Math.abs(visibleOffset(itemsAbove[itemsAbove.length-1])) < itemsAbove[itemsAbove.length-1].clientHeight ? itemsAbove[itemsAbove.length-1] : visibleItems[0]);
+							if (firstVisible) {
+								if ($(firstVisible).hasClass('selected') && itemsAbove.length > 0) {
+									// at top of viewport already, page scroll (if not at start)
+									// ...move selected item to bottom, and change selection to last fully visible item at top
+									scrollItemToBottom(firstVisible);
+									visibleItems = $('.active-menu-panel .slide-menu-items li').filter(function(item) { return visibleOffset(item) == 0; });
+									if (visibleItems[0] == firstVisible) {
+										// prev item is still beyond the viewport (for custom panels)
+										firstVisible = itemsAbove[itemsAbove.length-1];
+									} else {
+										firstVisible = visibleItems[0];
+									}
+								}
+								$('.active-menu-panel .slide-menu-items li').removeClass('selected');
+								selectItem(firstVisible);
+								// ensure selected item is positioned at the top of the viewport
+								scrollItemToTop(firstVisible);
+							}
+							break;
+						// pagedown, d
+						case 34: case 68:
+							var visibleItems = $('.active-menu-panel .slide-menu-items li').filter(function(item) { return visibleOffset(item) == 0; });
+							var itemsBelow = $('.active-menu-panel .slide-menu-items li').filter(function(item) { return visibleOffset(item) < 0; });
+
+							var lastVisible = (itemsBelow.length > 0 && Math.abs(visibleOffset(itemsBelow[0])) < itemsBelow[0].clientHeight ? itemsBelow[0] : visibleItems[visibleItems.length-1]);
+							if (lastVisible) {
+								if ($(lastVisible).hasClass('selected') && itemsBelow.length > 0) {
+									// at bottom of viewport already, page scroll (if not at end)
+									// ...move selected item to top, and change selection to last fully visible item at bottom
+									scrollItemToTop(lastVisible);
+									visibleItems = $('.active-menu-panel .slide-menu-items li').filter(function(item) { return visibleOffset(item) == 0; });
+									if (visibleItems[visibleItems.length-1] == lastVisible) {
+										// next item is still beyond the viewport (for custom panels)
+										lastVisible = itemsBelow[0];
+									} else {
+										lastVisible = visibleItems[visibleItems.length-1];
+									}
+								}
+								$('.active-menu-panel .slide-menu-items li').removeClass('selected');
+								selectItem(lastVisible);
+								// ensure selected item is positioned at the bottom of the viewport
+								scrollItemToBottom(lastVisible);
+							}
+							break;
+						// home
+						case 36:
+							$('.active-menu-panel .slide-menu-items li').removeClass('selected');
+							var sel = $('.active-menu-panel .slide-menu-items li:first-of-type');
+							if (sel.length > 0) {
+								keepVisible(sel.addClass('selected').get(0));
+							}
+							break;
+						// end
+						case 35:
+							$('.active-menu-panel .slide-menu-items li').removeClass('selected');
+							var sel = $('.active-menu-panel .slide-menu-items li:last-of-type');
+							if (sel.length > 0) {
+								keepVisible(sel.addClass('selected').get(0));
+							}
+							break;
+						// space, return
+						case 32: case 13:
+							var currItem = $('.active-menu-panel .slide-menu-items li.selected').get(0);
+							if (currItem) {
+								openItem(currItem);
+							}
+							break;
+						// esc
+						case 27: closeMenu(); break;
+					}
+				}
+			}
+
+			if (keyboard) {
+				//XXX add keyboard option for custom key codes, etc.
+
+				document.addEventListener('keydown', onDocumentKeyDown, false);
+
+				// handle key presses within speaker notes
+				window.addEventListener( 'message', function( event ) {
+					var data = JSON.parse( event.data );
+					if (data.method === 'triggerKey') {
+						onDocumentKeyDown( { keyCode: data.args[0], stopImmediatePropagation: function() {} } );
+					}
+				});
+
+				// Prevent reveal from processing keyboard events when the menu is open
+				if (config.keyboardCondition && typeof config.keyboardCondition === 'function') {
+					// combine user defined keyboard condition with the menu's own condition
+					var userCondition = config.keyboardCondition;
+					config.keyboardCondition = function() {
+						return userCondition() && !isOpen();
+					};
+				} else {
+					config.keyboardCondition = function() { return !isOpen(); }
+				}
+			}
+
+
+			//
+			// Utilty functions
+			//
+
+			function openMenu(event) {
+				if (event) event.preventDefault();
+				if (!isOpen()) {
+				    $('body').addClass('slide-menu-active');
+				    $('.reveal').addClass('has-' + options.effect + '-' + side);
+				    $('.slide-menu').addClass('active');
+				    $('.slide-menu-overlay').addClass('active');
+
+				    // identify active theme
+				    $('div[data-panel="Themes"] li').removeClass('active');
+				    $('li[data-theme="' + $('#theme').attr('href') + '"]').addClass('active');
+
+				    // identify active transition
+				    $('div[data-panel="Transitions"] li').removeClass('active');
+				    $('li[data-transition="' + Reveal.getConfig().transition + '"]').addClass('active');
+
+				    // set item selections to match active items
+				    $('.slide-menu-panel li.active')
+				    	.addClass('selected')
+				    	.each(function(item) { keepVisible(item) });
+				}
+			}
+
+			function closeMenu(event) {
+				if (event) event.preventDefault();
+			    $('body').removeClass('slide-menu-active');
+			    $('.reveal').removeClass('has-' + options.effect + '-' + side);
+			    $('.slide-menu').removeClass('active');
+			    $('.slide-menu-overlay').removeClass('active');
+			    $('.slide-menu-panel li.selected').removeClass('selected');
+			}
+
+			function toggleMenu(event) {
+				if (isOpen()) {
+					closeMenu(event);
+				} else {
+					openMenu(event);
+				}
+			}
+
+			function isOpen() {
+				return $('body').hasClass('slide-menu-active');
+			}
+
+			function openPanel(e) {
+				openMenu();
+				var panel = e;
+				if (typeof e !== "string") {
+					panel = $(e.currentTarget).data('panel');
+				}
+				$('.slide-menu-toolbar > li').removeClass('active-toolbar-button');
+				$('li[data-panel="' + panel + '"]').addClass('active-toolbar-button');
+				$('.slide-menu-panel').removeClass('active-menu-panel');
+				$('div[data-panel="' + panel + '"]').addClass('active-menu-panel');
+			}
+
+			function nextPanel() {
+				var next = ($('.active-toolbar-button').data('button') + 1) % buttons;
+				openPanel($('.toolbar-panel-button[data-button="' + next + '"]').data('panel'));
+			}
+
+			function prevPanel() {
+				var next = $('.active-toolbar-button').data('button') - 1;
+				if (next < 0) {
+					next = buttons - 1;
+				}
+				openPanel($('.toolbar-panel-button[data-button="' + next + '"]').data('panel'));
+			}
+
+			$('<nav class="slide-menu slide-menu--' + side + '"></nav>')
+				.appendTo($('.reveal'));
+			$('<div class="slide-menu-overlay"></div>')
+				.appendTo($('.reveal'))
+				.click(closeMenu);
+
+			var toolbar = $('<ol class="slide-menu-toolbar"></ol>').prependTo($('.slide-menu'));
+			var buttons = 0;
+			$('<li data-panel="Slides" data-button="' + (buttons++) + '" class="toolbar-panel-button"><span class="slide-menu-toolbar-label">Slides</span><br/><i class="fa fa-list"></i></li>')
+				.appendTo(toolbar)
+				.addClass('active-toolbar-button')
+				.click(openPanel);
+
+			if (custom) {
+				custom.forEach(function(element, index, array) {
+					$('<li data-panel="Custom' + index + '" data-button="' + (buttons++) + '" class="toolbar-panel-button"><span class="slide-menu-toolbar-label">' + element.title + '</span><br/>' + element.icon + '</i></li>')
+						.appendTo(toolbar)
+						.click(openPanel);
+				})
+			}
+
+			if (themes) {
+				$('<li data-panel="Themes" data-button="' + (buttons++) + '" class="toolbar-panel-button"><span class="slide-menu-toolbar-label">Themes</span><br/><i class="fa fa-desktop"></i></li>')
+					.appendTo(toolbar)
+					.click(openPanel);
+			}
+			if (transitions) {
+				$('<li data-panel="Transitions" data-button="' + (buttons++) + '" class="toolbar-panel-button"><span class="slide-menu-toolbar-label">Transitions</span><br/><i class="fa fa-arrows-h"></i></li>')
+					.appendTo(toolbar)
+					.click(openPanel);
+			}
+			$('<li id="close"><span class="slide-menu-toolbar-label">Close</span><br/><i class="fa fa-times"></i></li>')
+				.appendTo(toolbar)
+				.click(closeMenu);
+
+			var panels = $('.slide-menu');
+
+			//
+			// Slide links
+			//
+			function generateItem(type, section, i, h, v) {
+				var link = '/#/' + h;
+				if (typeof v === 'number' && !isNaN( v )) link += '/' + v;
+
+				var title = $(section).data('menu-title') ||
+					$('.menu-title', section).text() ||
+					$(titleSelector, section).text();
+				if (!title) {
+					if (hideMissingTitles) return '';
+					title = "Slide " + i;
+					type += ' no-title';
+				}
+
+				title = '<span class="slide-menu-item-title">' + title + '</span>';
+				if (numbers) {
+					// Number formatting taken from reveal.js
+					var value = [];
+					var format = 'h.v';
+
+					// Check if a custom number format is available
+					if( typeof numbers === 'string' ) {
+						format = numbers;
+					}
+					else if (typeof config.slideNumber === 'string') {
+						// Take user defined number format for slides
+						format = config.slideNumber;
+					}
+
+					switch( format ) {
+						case 'c':
+							value.push( i );
+							break;
+						case 'c/t':
+							value.push( i, '/', Reveal.getTotalSlides() );
+							break;
+						case 'h/v':
+							value.push( h + 1 );
+							if( typeof v === 'number' && !isNaN( v ) ) value.push( '/', v + 1 );
+							break;
+						default:
+							value.push( h + 1 );
+							if( typeof v === 'number' && !isNaN( v ) ) value.push( '.', v + 1 );
+					}
+
+					title = '<span class="slide-menu-item-number">' + value.join('') + '. </span>' + title;
+				}
+
+				var m = '';
+				if (markers) {
+					m = '<i class="fa fa-check-circle past"></i>' +
+								'<i class="fa fa-dot-circle-o active"></i>' + 
+								'<i class="fa fa-circle-thin future"></i>';
+				}
+
+				return '<li class="' + type + '" data-item="' + i + '" data-slide-h="' + h + '" data-slide-v="' + (v === undefined ? 0 : v) + '">' + m + title + '</li>';
+			}
+
+			function openItem(item) {
+				var h = $(item).data('slide-h');
+				var v = $(item).data('slide-v');
+				var theme = $(item).data('theme');
+				var transition = $(item).data('transition');
+				if (typeof h !== "undefined" && typeof v !== "undefined") {
+					Reveal.slide(h, v);
+					closeMenu();
+				} else if (theme) {
+					$('#theme').attr('href', theme);
+					closeMenu();
+				} else if (transition) {
+					Reveal.configure({ transition: transition });
+					closeMenu();
+				} else {
+					var links = $(item).find('a');
+					if (links.length > 0) {
+						links.get(0).click();
+					}
+					closeMenu();
+				}
+			}
+
+			function clicked(event) {
+				if (event.target.nodeName !== "A") {
+					event.preventDefault();
+				}
+				openItem(event.currentTarget);
+			}
+
+			function highlightCurrentSlide() {
+				var state = Reveal.getState();
+				$('li.slide-menu-item, li.slide-menu-item-vertical')
+					.removeClass('past')
+					.removeClass('active')
+					.removeClass('future');
+
+				$('li.slide-menu-item, li.slide-menu-item-vertical').each(function(e) {
+					var h = $(e).data('slide-h');
+					var v = $(e).data('slide-v');
+					if (h < state.indexh || (h === state.indexh && v < state.indexv)) {
+						$(e).addClass('past');
+					}
+					else if (h === state.indexh && v === state.indexv) {
+						$(e).addClass('active');
+					}
+					else {
+						$(e).addClass('future');
+					}
+				});
+			}
+
+			function createSlideMenu() {
+				if ( !document.querySelector('section[data-markdown]:not([data-markdown-parsed])') ) {
+					$('<div data-panel="Slides" class="slide-menu-panel"><ul class="slide-menu-items"></ul></div>')
+						.appendTo(panels)
+						.addClass('active-menu-panel');
+					var items = $('.slide-menu-panel[data-panel="Slides"] > .slide-menu-items');
+					var slideCount = 0;
+					$('.slides > section').each(function(section, h) {
+						var subsections = $('section', section);
+						if (subsections.length > 0) {
+							subsections.each(function(subsection, v) {
+								var type = (v === 0 ? 'slide-menu-item' : 'slide-menu-item-vertical');
+								var item = generateItem(type, subsection, slideCount, h, v);
+								if (item) {
+									slideCount++;
+									items.append(item);
+								}
+							});
+						} else {
+							var item = generateItem('slide-menu-item', section, slideCount, h);
+							if (item) {
+								slideCount++;
+								items.append(item);
+							}
+						}
+					});
+					$('.slide-menu-item, .slide-menu-item-vertical').click(clicked);
+					highlightCurrentSlide();
+				}
+				else {
+				// wait for markdown to be loaded and parsed
+					setTimeout( createSlideMenu, 100 );
+				}
+			}
+
+			createSlideMenu();
+			Reveal.addEventListener('slidechanged', highlightCurrentSlide);
+
+			//
+			// Custom menu panels
+			//
+			if (custom) {
+				function xhrSuccess () {
+					if (this.status >= 200 && this.status < 300) {
+						$(this.responseText).appendTo(this.panel);
+						enableCustomLinks(this.panel);
+					}
+					else {
+						showErrorMsg(this)
+					}
+				}
+				function xhrError () {
+					showErrorMsg(this)
+				}
+				function loadCustomPanelContent (panel, sURL) {
+					var oReq = new XMLHttpRequest();
+					oReq.panel = panel;
+					oReq.arguments = Array.prototype.slice.call(arguments, 2);
+					oReq.onload = xhrSuccess;
+					oReq.onerror = xhrError;
+					oReq.open("get", sURL, true);
+					oReq.send(null);
+				}
+				function enableCustomLinks(panel) {
+					$(panel).find('ul.slide-menu-items li.slide-menu-item').each(function(item, i) {
+						$(item).attr('data-item', i+1);
+						$(item).click(clicked);
+					});
+				}
+				function showErrorMsg(response) {
+					var msg = '<p>ERROR: The attempt to fetch ' + response.responseURL + ' failed with HTTP status ' + 
+						response.status + ' (' + response.statusText + ').</p>' +
+						'<p>Remember that you need to serve the presentation HTML from a HTTP server.</p>';
+						$(msg).appendTo(response.panel)
+				}
+
+				custom.forEach(function(element, index, array) {
+					var panel = $('<div data-panel="Custom' + index + '" class="slide-menu-panel slide-menu-custom-panel"></div>');
+					if (element.content) {
+						$(element.content).appendTo(panel);
+						enableCustomLinks(panel);
+					}
+					else if (element.src) {
+						loadCustomPanelContent(panel, element.src);
+					}
+					panel.appendTo(panels);
+				})
+			}
+
+			//
+			// Themes
+			//
+			if (themes) {
+				var panel = $('<div data-panel="Themes" class="slide-menu-panel"></div>').appendTo(panels);
+				var menu = $('<ul class="slide-menu-items"></ul>').appendTo(panel);
+				themes.forEach(function(t, i) {
+					$('<li class="slide-menu-item" data-theme="' + t.theme + '" data-item="' + (i+1) + '">' + t.name + '</li>').appendTo(menu).click(clicked);
+				})
+			}
+
+			//
+			// Transitions
+			//
+			if (transitions) {
+				var panel = $('<div data-panel="Transitions" class="slide-menu-panel"></div>').appendTo(panels);
+				var menu = $('<ul class="slide-menu-items"></ul>').appendTo(panel);
+				  ['None', 'Fade', 'Slide', 'Convex', 'Concave', 'Zoom', 'Cube', 'Page'].forEach(function(name, i) {
+					$('<li class="slide-menu-item" data-transition="' + name.toLowerCase() + '" data-item="' + (i+1) + '">' + name + '</li>').appendTo(menu).click(clicked);
+				})
+			}
+
+			//
+			// Open menu options
+			//
+			if (openButton) {
+				// add menu button
+				$('<div class="slide-menu-button"><a href="#"><i class="fa fa-bars"></i></a></div>')
+					.appendTo($('.reveal'))
+					.click(openMenu);
+			}
+
+			if (openSlideNumber) {
+				// wrap slide number in link
+				$('<div class="slide-number-wrapper"><a href="#"></a></div>').insertAfter($('div.slide-number'));
+				$('.slide-number').appendTo($('.slide-number-wrapper a'));
+				$('.slide-number-wrapper a').click(openMenu);
+			}
+
+			//
+			// Handle mouse overs
+			//
+			var mouseSelectionEnabled = true;
+			$('.slide-menu-panel .slide-menu-items li').mouseenter(function(event) {
+				if (mouseSelectionEnabled) {
+					$('.active-menu-panel .slide-menu-items li').removeClass('selected');
+					$(event.currentTarget).addClass('selected');
+				}
+			});
+
+			module.toggle = toggleMenu;
+			module.isOpen = isOpen;
+
+			/**
+			 * Extend object a with the properties of object b.
+			 * If there's a conflict, object b takes precedence.
+			 */
+			function extend( a, b ) {
+				for( var i in b ) {
+					a[ i ] = b[ i ];
+				}
+			}
+
+			/**
+			 * Dispatches an event of the specified type from the
+			 * reveal DOM element.
+			 */
+			function dispatchEvent( type, args ) {
+				var event = document.createEvent( 'HTMLEvents', 1, 2 );
+				event.initEvent( type, true, true );
+				extend( event, args );
+				document.querySelector('.reveal').dispatchEvent( event );
+
+				// If we're in an iframe, post each reveal.js event to the
+				// parent window. Used by the notes plugin
+				if( config.postMessageEvents && window.parent !== window.self ) {
+					window.parent.postMessage( JSON.stringify({ namespace: 'reveal', eventName: type, state: getState() }), '*' );
+				}
+			}
+
+			dispatchEvent('menu-ready');
+		}
+	})
+	})
+	});
+
+	// modified from math plugin
+	function loadResource( url, type, callback ) {
+		var head = document.querySelector( 'head' );
+		var resource;
+
+		if ( type === 'script' ) {
+			resource = document.createElement( 'script' );
+			resource.type = 'text/javascript';
+			resource.src = url;
+		}
+		else if ( type === 'stylesheet' ) {
+			resource = document.createElement( 'link' );
+			resource.rel = 'stylesheet';
+			resource.href = url;
+		}
+
+		// Wrapper for callback to make sure it only fires once
+		var finish = function() {
+			if( typeof callback === 'function' ) {
+				callback.call();
+				callback = null;
+			}
+		}
+
+		resource.onload = finish;
+
+		// IE
+		resource.onreadystatechange = function() {
+			if ( this.readyState === 'loaded' ) {
+				finish();
+			}
+		}
+
+		// Normal browsers
+		head.appendChild( resource );
+	}
+
+	function scriptPath() {
+		// obtain plugin path from the script element
+		var path;
+		if (document.currentScript) {
+			path = document.currentScript.src.slice(0, -7);
+		} else {
+			var sel = document.querySelector('script[src$="/menu.js"]')
+			if (sel) {
+				path = sel.src.slice(0, -7);
+			}
+		}
+		return path;
+	}
+
+	return module;
+})();
diff --git a/inst/rmarkdown/templates/revealjs_presentation/resources/default.html b/inst/rmarkdown/templates/revealjs_presentation/resources/default.html
index 34f4c3d..5fd2a7f 100644
--- a/inst/rmarkdown/templates/revealjs_presentation/resources/default.html
+++ b/inst/rmarkdown/templates/revealjs_presentation/resources/default.html
@@ -90,6 +90,14 @@
       border-color: gray;
     }
 
+$if(plugin-menu)$
+$if(plugin-chalkboard)$
+    .reveal .slide-menu-button {
+      left: 105px !important;
+    }
+$endif$
+$endif$
+
   </style>
 
     <style type="text/css">code{white-space: pre;}</style>
@@ -654,6 +662,39 @@
         maxScale: $maxScale$,
 $endif$
 
+$if(plugin-menu)$
+        menu: {
+$if(menu-side)$
+          side: $menu-side$,
+$endif$   
+$if(menu-numbers)$
+          numbers: $menu-numbers$,
+$endif$    
+$if(menu-titleSelector)$
+          titleSelector: $menu-titleSelector$,
+$endif$    
+$if(menu-hideMissingTitles)$
+          hideMissingTitles: $menu-hideMissingTitles$,
+$endif$    
+$if(menu-markers)$
+          markers: $menu-markers$,
+$endif$    
+$if(menu-openButton)$
+          openButton: $menu-openButton$,
+$endif$    
+$if(menu-openSlideNumber)$
+          openSlideNumber: $menu-openSlideNumber$,
+$endif$    
+$if(menu-keyboard)$
+          keyboard: $menu-keyboard$,
+$endif$ 
+          custom: false,
+          themes: false,
+          transitions: false
+        },
+
+$endif$
+
 $if(plugin-chalkboard)$
 
         chalkboard: {
@@ -709,6 +750,9 @@
 $if(plugin-chalkboard)$
           { src: '$revealjs-url$/plugin/chalkboard/chalkboard.js', async: true },
 $endif$
+$if(plugin-menu)$
+          { src: '$revealjs-url$/plugin/menu/menu.js', async: true },
+$endif$
         ]
       });
     </script>