!function(D,j,R,z){"use strict";j=void 0!==j&&j.Math==Math?j:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),D.fn.sidebar=function(C){var k,e=D(this),w=D(j),T=D(R),x=D("html"),S=D("head"),A=e.selector||"",F=(new Date).getTime(),O=[],P=C,E="string"==typeof P,H=[].slice.call(arguments,1),M=j.requestAnimationFrame||j.mozRequestAnimationFrame||j.webkitRequestAnimationFrame||j.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var s,a,e,i,l,c,d=D.isPlainObject(C)?D.extend(!0,{},D.fn.sidebar.settings,C):D.extend({},D.fn.sidebar.settings),n=d.selector,r=d.className,t=d.namespace,o=d.regExp,u=d.error,f="."+t,b="module-"+t,h=D(this),m=D(d.context),g=h.children(n.sidebar),v=(m.children(n.fixed),m.children(n.pusher)),p=this,y=h.data(b);c={initialize:function(){c.debug("Initializing sidebar",C),c.create.id(),l=c.get.transitionEvent(),d.delaySetup?M(c.setup.layout):c.setup.layout(),M(function(){c.setup.cache()}),c.instantiate()},instantiate:function(){c.verbose("Storing instance of module",c),y=c,h.data(b,c)},create:{id:function(){e=(Math.random().toString(16)+"000000000").substr(2,8),a="."+e,c.verbose("Creating unique id for element",e)}},destroy:function(){c.verbose("Destroying previous module for",h),h.off(f).removeData(b),c.is.ios()&&c.remove.ios(),m.off(a),w.off(a),T.off(a)},event:{clickaway:function(e){var i=0=p.scrollHeight&&(p.scrollTop=p.scrollHeight-p.offsetHeight-1)},scroll:function(e){0===D(e.target).closest(n.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){c.verbose("Adding clickaway events to context",m),d.closable&&m.on("click"+a,c.event.clickaway).on("touchend"+a,c.event.clickaway)},scrollLock:function(){d.scrollLock&&(c.debug("Disabling page scroll"),w.on("DOMMouseScroll"+a,c.event.scroll)),c.verbose("Adding events to contain sidebar scroll"),T.on("touchmove"+a,c.event.touch),h.on("scroll"+f,c.event.containScroll)}},unbind:{clickaway:function(){c.verbose("Removing clickaway events from context",m),m.off(a)},scrollLock:function(){c.verbose("Removing scroll lock from page"),T.off(a),w.off(a),h.off("scroll"+f)}},add:{inlineCSS:function(){var e,i=c.cache.width||h.outerWidth(),n=c.cache.height||h.outerHeight(),t=c.is.rtl(),o=c.get.direction(),r={left:i,right:-i,top:n,bottom:-n};t&&(c.verbose("RTL detected, flipping widths"),r.left=-i,r.right=i),e="").appendTo(S),c.debug("Adding sizing css to head",s)}},refresh:function(){c.verbose("Refreshing selector cache"),m=D(d.context),g=m.children(n.sidebar),v=m.children(n.pusher),m.children(n.fixed),c.clear.cache()},refreshSidebars:function(){c.verbose("Refreshing other sidebars"),g=m.children(n.sidebar)},repaint:function(){c.verbose("Forcing repaint event"),p.style.display="none";p.offsetHeight;p.scrollTop=p.scrollTop,p.style.display=""},setup:{cache:function(){c.cache={width:h.outerWidth(),height:h.outerHeight(),rtl:"rtl"==h.css("direction")}},layout:function(){0===m.children(n.pusher).length&&(c.debug("Adding wrapper element for sidebar"),c.error(u.pusher),v=D('
'),m.children().not(n.omitted).not(g).wrapAll(v),c.refresh()),0!==h.nextAll(n.pusher).length&&h.nextAll(n.pusher)[0]===v[0]||(c.debug("Moved sidebar to correct parent element"),c.error(u.movedSidebar,p),h.detach().prependTo(m),c.refresh()),c.clear.cache(),c.set.pushable(),c.set.direction()}},attachEvents:function(e,i){var n=D(e);i=D.isFunction(c[i])?c[i]:c.toggle,0