(function(c){var m={classFocus:"active",initFocus:0,focused:function(){},dataType:"json",forceFocus:false},j=c.browser.msie&&parseInt(c.browser.version)<8,p=function(h,e,a){a=c.extend({},m,a||{});var i=false,f=null,k=function(){if(!i){var b=c(this);if(!(!a.forceFocus&&b.hasClass(a.classFocus))){i=true;if(a.dataType==null){f&&f.removeClass(a.classFocus);f=b.addClass(a.classFocus);a.focused(b);i=false}else c.ajax({url:b.attr("url"),type:"GET",dataType:a.dataType,success:function(d){f&&f.removeClass(a.classFocus);
f=b.addClass(a.classFocus);a.focused(b,d)},complete:function(){i=false}})}}},n=function(b){var d=c('<a href="javascript:;">'+b.name+"</a>"),l=c("<li/>").append(d).click(k);j?d.focus(function(){this.blur()}):d.css("outline","none");a.dataType=="function"&&l.attr("url",b.url);h.append(l)},g=c(">li",h);if(g.length)g.each(function(){var b=c(this),d=c("a",b);j?d.focus(function(){this.blur()}):d.css("outline","none");b.attr("url",d.attr("href")).click(k)});else{g=0;for(var o=e.length;g<o;g++)n(e[g])}a.initFocus>
-1&&h.find(">li:eq("+a.initFocus+")").click()};c.fn.tabnav=function(h,e){e||(e=[]);p(this,e,h);return this}})(jQuery);
