(function(n){n.fn.mzTab=function(t){function f(){return e.find("*[data-id]")}function o(t){var i=n(t),r=f(),u=i.data("id");r.each(function(){var t=n(this).data("id");t&&(u==t?(n("#"+t).show(),n(this).addClass("active")):(n("#"+t).hide(),n(this).removeClass("active")))})}var e=n(this),r=e.find(".active"),i={beforeTabClick:function(){}},u;if(t)for(u in t)i[u]&&(i[u]=t[u]);r.length==0&&(r=f().eq(0)),i.beforeTabClick&&i.beforeTabClick(r.data("id"))||o(r);f().on("click",function(){return i.beforeTabClick&&i.beforeTabClick(n(this).data("id"))?!1:(o(n(this)),!1)})}})(jQuery)