$(function(){var a=document.getElementById("mainPanel"),e=$("li.tab",a),h=e.find("a.tab-link"),i=null,b=null,c=5000,j=900,d=0;function g(){if(b){clearTimeout(b);b=null;}}function f(k,l){g();if((i)&&(i.length)){i.removeClass("active").next().css({"z-index":"0"}).fadeOut(j);}i=k.addClass("active").next().css({"z-index":"1"}).fadeIn(j,function(){if(!l){b=setTimeout(function(){d++;if(d>=h.length){d=0;}f(h.eq(d));},c);}}).end();}h.click(function(k){k.preventDefault();f($(this),true);});e.not(e.eq(0)).find("div.content").hide().css({"z-index":"0"});f(h.eq(0));});
