(function(a){var i=false;a.fn.tabcontrol=function(b,g,e){var d=a.extend({},a.fn.tabcontrol.defaults,e);return this.each(function(){var c=a(this),f=a.meta?a.extend({},d,c.data()):d,e=f.tabsInside?a(b,this):a(b),h=f.contentInside?a(g,this):a(g),c=h.first(),j=e.first();if(f.usePermalinks){var k=window.location.hash;k!=""&&(c=h.filter(k),c.length==0?(c=h.first(),j=e.first()):j=e.filter("[href="+k+"]"))}j.addClass(f.selectedClass);c.addClass(f.selectedClass);h.not("."+f.selectedClass).hide();e.click(function(){i||
(i=true,a.fn.tabcontrol.showTab(f,e,h,this));return false})})};a.fn.tabcontrol.resetAll=function(b,a,e,d){var c=e.filter(":visible");a.removeClass(b.selectedClass);e.removeClass(b.selectedClass);b.effect==false?(c.hide(),d()):b.effect=="fade"?c.fadeOut(b.effectDuration,d):b.effect=="slide"&&c.slideUp(b.effectDuration,d)};a.fn.tabcontrol.nextTab=function(){};a.fn.tabcontrol.prevTab=function(){};a.fn.tabcontrol.jumpTo=function(){};a.fn.tabcontrol.showTab=function(b,g,e,d){var c=a(d).attr("href");a(d).trigger("tab:beforechange",
d,c);if(b.onBefore!=false&&typeof b.onBefore=="function")b.onBefore(b,g,e,d);if(b.usePermalinks)window.location.hash=c;a.fn.tabcontrol.resetAll(b,g,e,function(){var f=function(){i=false;if(b.onAfter!=false&&typeof b.onAfter=="function")b.onAfter(b,g,e,d);a(d).trigger("tab:afterchange",d,c)};b.effect==false?(a(c).show(),f()):b.effect=="fade"?a(c).fadeIn(b.effectDuration,function(){f()}):b.effect=="slide"&&a(c).slideDown(b.effectDuration,function(){f()});a(c).addClass(b.selectedClass)});a(d).addClass(b.selectedClass)};
a.fn.tabcontrol.defaults={tabsInside:true,contentInside:false,selectedClass:"selected",onBefore:false,onAfter:false,effect:false,effectDuration:"normal",usePermalinks:true}})(jQuery);

