$(document).ready(function(){var t=function(){var n=[],t=!1,i,r=function(){clearTimeout(i);i=setTimeout(u,10)},u=function(){for(var t=0,i=n.length;t<i;t++)n[t].apply()};return{register:function(i){n.push(i);t===!1&&($(window).bind("resize",r),t=!0)},unregister:function(t){for(var i=0,r=n.length;i<r;i++)if(n[i]==t){delete n[i];break}}}}(),n=function(n,i){this.element=$(n);this.dropdown=$('<li class="dropdown hide pull-right tabdrop"><a class="dropdown-toggle" data-toggle="dropdown" href="#"><b>'+i.otherText+'<b> <b class="caret"><\/b><\/a><ul class="dropdown-menu"><\/ul><\/li>').prependTo(this.element);this.element.parent().is(".tabs-below")&&this.dropdown.addClass("dropup");t.register($.proxy(this.layout,this));this.layout()};n.prototype={constructor:n,layout:function(){var n=[];this.dropdown.removeClass("hide");this.element.append(this.dropdown.find("li")).find(">li").not(".tabdrop").each(function(){this.offsetTop>10&&n.push(this)});n.length>0?(n=$(n),this.dropdown.find("ul").empty().append(n),this.dropdown.find(".active").length==1?this.dropdown.addClass("active"):this.dropdown.removeClass("active")):this.dropdown.addClass("hide")}};$.fn.tabdrop=function(t){return this.each(function(){var r=$(this),i=r.data("tabdrop"),u=typeof t=="object"&&t;i||r.data("tabdrop",i=new n(this,$.extend({},$.fn.tabdrop.defaults,u)));typeof t=="string"&&i[t]()})};$.fn.tabdrop.defaults={text:""};$.fn.tabdrop.Constructor=n})