/*!
* slicknav responsive mobile menu v1.0.10
* (c) 2016 josh cope
* licensed under mit
*/
!function(e,t,n){function a(t,n){this.element=t,this.settings=e.extend({},i,n),this.settings.duplicate||n.hasownproperty("removeids")||(this.settings.removeids=!1),this._defaults=i,this._name=s,this.init()}var i={label:"",duplicate:!0,duration:200,easingopen:"swing",easingclose:"swing",closedsymbol:"►",openedsymbol:"▼",prependto:"body",appendto:"",parenttag:"a",closeonclick:!1,allowparentlinks:!1,nestedparentlinks:!0,showchildren:!1,removeids:!0,removeclasses:!1,removestyles:!1,brand:"",animations:"jquery",init:function(){},beforeopen:function(){},beforeclose:function(){},afteropen:function(){},afterclose:function(){}},s="slicknav",o="slicknav",l={down:40,enter:13,escape:27,left:37,right:39,space:32,tab:9,up:38};a.prototype.init=function(){var n,a,i=this,s=e(this.element),r=this.settings;if(r.duplicate?i.mobilenav=s.clone():i.mobilenav=s,r.removeids&&(i.mobilenav.removeattr("id"),i.mobilenav.find("*").each(function(t,n){e(n).removeattr("id")})),r.removeclasses&&(i.mobilenav.removeattr("class"),i.mobilenav.find("*").each(function(t,n){e(n).removeattr("class")})),r.removestyles&&(i.mobilenav.removeattr("style"),i.mobilenav.find("*").each(function(t,n){e(n).removeattr("style")})),n=o+"_icon",""===r.label&&(n+=" "+o+"_no-text"),"a"==r.parenttag&&(r.parenttag='a href="#"'),i.mobilenav.attr("class",o+"_nav"),a=e('
'),""!==r.brand){var c=e(''+r.brand+"
");e(a).append(c)}i.btn=e(["<"+r.parenttag+' aria-haspopup="true" role="button" tabindex="0" class="'+o+"_btn "+o+'_collapsed">','",'','','','',"",""+r.parenttag+">"].join("")),e(a).append(i.btn),""!==r.appendto?e(r.appendto).append(a):e(r.prependto).prepend(a),a.append(i.mobilenav);var p=i.mobilenav.find("li");e(p).each(function(){var t=e(this),n={};if(n.children=t.children("ul").attr("role","menu"),t.data("menu",n),n.children.length>0){var a=t.contents(),s=!1,l=[];e(a).each(function(){return e(this).is("ul")?!1:(l.push(this),void(e(this).is("a")&&(s=!0)))});var c=e("<"+r.parenttag+' role="menuitem" aria-haspopup="true" tabindex="-1" class="'+o+'_item"/>');if(r.allowparentlinks&&!r.nestedparentlinks&&s)e(l).wrapall('').parent();else{var p=e(l).wrapall(c).parent();p.addclass(o+"_row")}r.showchildren?t.addclass(o+"_open"):t.addclass(o+"_collapsed"),t.addclass(o+"_parent");var d=e(''+(r.showchildren?r.openedsymbol:r.closedsymbol)+"");r.allowparentlinks&&!r.nestedparentlinks&&s&&(d=d.wrap(c).parent()),e(l).last().after(d)}else 0===t.children().length&&t.addclass(o+"_txtnode");t.children("a").attr("role","menuitem").click(function(t){r.closeonclick&&!e(t.target).parent().closest("li").hasclass(o+"_parent")&&e(i.btn).click()}),r.closeonclick&&r.allowparentlinks&&(t.children("a").children("a").click(function(t){e(i.btn).click()}),t.find("."+o+"_parent-link a:not(."+o+"_item)").click(function(t){e(i.btn).click()}))}),e(p).each(function(){var t=e(this).data("menu");r.showchildren||i._visibilitytoggle(t.children,null,!1,null,!0)}),i._visibilitytoggle(i.mobilenav,null,!1,"init",!0),i.mobilenav.attr("role","menu"),e(t).mousedown(function(){i._outlines(!1)}),e(t).keyup(function(){i._outlines(!0)}),e(i.btn).click(function(e){e.preventdefault(),i._menutoggle()}),i.mobilenav.on("click","."+o+"_item",function(t){t.preventdefault(),i._itemclick(e(this))}),e(i.btn).keydown(function(t){var n=t||event;switch(n.keycode){case l.enter:case l.space:case l.down:t.preventdefault(),n.keycode===l.down&&e(i.btn).hasclass(o+"_open")||i._menutoggle(),e(i.btn).next().find('[role="menuitem"]').first().focus()}}),i.mobilenav.on("keydown","."+o+"_item",function(t){var n=t||event;switch(n.keycode){case l.enter:t.preventdefault(),i._itemclick(e(t.target));break;case l.right:t.preventdefault(),e(t.target).parent().hasclass(o+"_collapsed")&&i._itemclick(e(t.target)),e(t.target).next().find('[role="menuitem"]').first().focus()}}),i.mobilenav.on("keydown",'[role="menuitem"]',function(t){var n=t||event;switch(n.keycode){case l.down:t.preventdefault();var a=e(t.target).parent().parent().children().children('[role="menuitem"]:visible'),s=a.index(t.target),r=s+1;a.length<=r&&(r=0);var c=a.eq(r);c.focus();break;case l.up:t.preventdefault();var a=e(t.target).parent().parent().children().children('[role="menuitem"]:visible'),s=a.index(t.target),c=a.eq(s-1);c.focus();break;case l.left:if(t.preventdefault(),e(t.target).parent().parent().parent().hasclass(o+"_open")){var p=e(t.target).parent().parent().prev();p.focus(),i._itemclick(p)}else e(t.target).parent().parent().hasclass(o+"_nav")&&(i._menutoggle(),e(i.btn).focus());break;case l.escape:t.preventdefault(),i._menutoggle(),e(i.btn).focus()}}),r.allowparentlinks&&r.nestedparentlinks&&e("."+o+"_item a").click(function(e){e.stopimmediatepropagation()})},a.prototype._menutoggle=function(e){var t=this,n=t.btn,a=t.mobilenav;n.hasclass(o+"_collapsed")?(n.removeclass(o+"_collapsed"),n.addclass(o+"_open")):(n.removeclass(o+"_open"),n.addclass(o+"_collapsed")),n.addclass(o+"_animating"),t._visibilitytoggle(a,n.parent(),!0,n)},a.prototype._itemclick=function(e){var t=this,n=t.settings,a=e.data("menu");a||(a={},a.arrow=e.children("."+o+"_arrow"),a.ul=e.next("ul"),a.parent=e.parent(),a.parent.hasclass(o+"_parent-link")&&(a.parent=e.parent().parent(),a.ul=e.parent().next("ul")),e.data("menu",a)),a.parent.hasclass(o+"_collapsed")?(a.arrow.html(n.openedsymbol),a.parent.removeclass(o+"_collapsed"),a.parent.addclass(o+"_open"),a.parent.addclass(o+"_animating"),t._visibilitytoggle(a.ul,a.parent,!0,e)):(a.arrow.html(n.closedsymbol),a.parent.addclass(o+"_collapsed"),a.parent.removeclass(o+"_open"),a.parent.addclass(o+"_animating"),t._visibilitytoggle(a.ul,a.parent,!0,e))},a.prototype._visibilitytoggle=function(t,n,a,i,s){function l(t,n){e(t).removeclass(o+"_animating"),e(n).removeclass(o+"_animating"),s||p.afteropen(t)}function r(n,a){t.attr("aria-hidden","true"),d.attr("tabindex","-1"),c._setvisattr(t,!0),t.hide(),e(n).removeclass(o+"_animating"),e(a).removeclass(o+"_animating"),s?"init"==n&&p.init():p.afterclose(n)}var c=this,p=c.settings,d=c._getactionitems(t),u=0;a&&(u=p.duration),t.hasclass(o+"_hidden")?(t.removeclass(o+"_hidden"),s||p.beforeopen(i),"jquery"===p.animations?t.stop(!0,!0).slidedown(u,p.easingopen,function(){l(i,n)}):"velocity"===p.animations&&t.velocity("finish").velocity("slidedown",{duration:u,easing:p.easingopen,complete:function(){l(i,n)}}),t.attr("aria-hidden","false"),d.attr("tabindex","0"),c._setvisattr(t,!1)):(t.addclass(o+"_hidden"),s||p.beforeclose(i),"jquery"===p.animations?t.stop(!0,!0).slideup(u,this.settings.easingclose,function(){r(i,n)}):"velocity"===p.animations&&t.velocity("finish").velocity("slideup",{duration:u,easing:p.easingclose,complete:function(){r(i,n)}}))},a.prototype._setvisattr=function(t,n){var a=this,i=t.children("li").children("ul").not("."+o+"_hidden");n?i.each(function(){var t=e(this);t.attr("aria-hidden","true");var i=a._getactionitems(t);i.attr("tabindex","-1"),a._setvisattr(t,n)}):i.each(function(){var t=e(this);t.attr("aria-hidden","false");var i=a._getactionitems(t);i.attr("tabindex","0"),a._setvisattr(t,n)})},a.prototype._getactionitems=function(e){var t=e.data("menu");if(!t){t={};var n=e.children("li"),a=n.find("a");t.links=a.add(n.find("."+o+"_item")),e.data("menu",t)}return t.links},a.prototype._outlines=function(t){t?e("."+o+"_item, ."+o+"_btn").css("outline",""):e("."+o+"_item, ."+o+"_btn").css("outline","none")},a.prototype.toggle=function(){var e=this;e._menutoggle()},a.prototype.open=function(){var e=this;e.btn.hasclass(o+"_collapsed")&&e._menutoggle()},a.prototype.close=function(){var e=this;e.btn.hasclass(o+"_open")&&e._menutoggle()},e.fn[s]=function(t){var n=arguments;if(void 0===t||"object"==typeof t)return this.each(function(){e.data(this,"plugin_"+s)||e.data(this,"plugin_"+s,new a(this,t))});if("string"==typeof t&&"_"!==t[0]&&"init"!==t){var i;return this.each(function(){var o=e.data(this,"plugin_"+s);o instanceof a&&"function"==typeof o[t]&&(i=o[t].apply(o,array.prototype.slice.call(n,1)))}),void 0!==i?i:this}}}(jquery,document,window);