!function(a){a.fn.menumaker=function(b){var c=a(this),d=a.extend({format:"dropdown",sticky:!1},b);return this.each(function(){return a(this).find(".button").on("click",function(){a(this).toggleClass("menu-opened");var b=a(this).next("ul");b.hasClass("open")?b.slideToggle().removeClass("open"):(b.slideToggle().addClass("open"),"dropdown"===d.format&&b.find("ul").show())}),c.find("li ul").parent().addClass("has-sub"),multiTg=function(){c.find(".has-sub").prepend('<span class="submenu-button"></span>'),c.find(".submenu-button").on("click",function(){a(this).toggleClass("submenu-opened"),a(this).siblings("ul").hasClass("open")?a(this).siblings("ul").removeClass("open").slideToggle():a(this).siblings("ul").addClass("open").slideToggle()})},"multitoggle"===d.format?multiTg():c.addClass("dropdown"),d.sticky===!0&&c.css("position","fixed")})}}(jQuery),function(a){a(document).ready(function(){a("#cssmenu").menumaker({format:"multitoggle"})})}(jQuery);