(function(c){var a={init:function(d){var e={indent:15,slideSpeed:"slow"};var f=window.location.pathname;if(d){c.extend(e,d)}this.find("ul").each(function(){c(this).addClass("level"+c(this).parents("ul").length)});this.find("a").click(function(){var g=c(this);if(g.hasClass("current")){return false}if(g.attr("target")!="_blank"){b(g)}});return this},select:function(d){b(c("#"+d));return this}};var b=function(f){if(!f.length){return}var g=c("a.current");if(f.closest(g.parent()).length==0){var e=f.add(g).commonAncestor();if(e.length){e.find("ul").hide()}}g.removeClass("current");f.addClass("current");var d=f.next();if(d.is("ul")&&!d.is(":visible")){d.parents("ul").show().end().show()}else{f.parents("ul").show()}};c.fn.sideMenu=function(d){if(a[d]){return a[d].apply(this,Array.prototype.slice.call(arguments,1))}else{if(!d||typeof d==="object"){return a.init.apply(this,arguments)}else{c.error("Method "+d+" does not exist on jQuery.sideMenu")}}}})(jQuery);
