/* 

Author: Bruno Pinto
Date: 2009-08-26 (Wed, 26 Aug 2009) 

*/

(function($) {
	$.fn.extend({
		menuToggle : function(speed) {
			if (!speed) speed = "normal";
			$(this).click( function() {
				var parent = $(this).parent()
				if (parent.children("ul").length > 0) {
					$(this).attr("href", "javascript:;");
					if (parent.hasClass("active")) parent.removeClass("active", speed);
					else parent.addClass("active", speed);
					parent.children("ul").slideToggle(speed);
				}
			});
			return true;
		}
	})
})(jQuery);