(function(a){a.fn.extend({getUniqueId:function(a){return a+(new Date).getTime()},accessibleTabs:function(d){var b=a.extend({wrapperClass:"content",currentClass:"current",tabhead:"h4",tabbody:".tabbody",fx:"show",fxspeed:"normal",currentInfoText:"current tab: ",currentInfoPosition:"prepend",currentInfoClass:"current-info"},d),e=this;return this.each(function(){var c=a(this),f="",g=e.getUniqueId("accessibletabscontent"),d=e.getUniqueId("accessibletabs");a(c).wrapInner('<div class="'+b.wrapperClass+
'"></div>');a(c).find(b.tabhead).each(function(b){var c="";b===0&&(c=' id="'+d+'"');f+="<li><a"+c+' href="#'+g+'">'+a(this).text()+"</a></li>";a(this).remove()});a(c).prepend('<ul class="ultab">'+f+"</ul>");a(c).find(b.tabbody).hide();a(c).find(b.tabbody+":first").show();a(c).find("ul>li:first").addClass(b.currentClass).find("a")[b.currentInfoPosition]('<span class="'+b.currentInfoClass+'">'+b.currentInfoText+"</span>");a(c).find("ul.ultab>li>a").each(function(d){a(this).click(function(e){e.preventDefault();
a(c).find("ul>li.current").removeClass(b.currentClass).find("span."+b.currentInfoClass).remove();a(this).blur();a(c).find(b.tabbody+":visible").hide();a(c).find(b.tabbody).eq(d)[b.fx](b.fxspeed);a("#"+g).text(a(this).text()).focus();a(this)[b.currentInfoPosition]('<span class="'+b.currentInfoClass+'">'+b.currentInfoText+"</span>").parent().addClass(b.currentClass)})})})}})})(jQuery);

