text: /*
   * SmartTab plugin v2.0
   * jQuery Tab Control Plugin
   * 
   * by Dipu Raj  
   * http://techlaboratory.net/smarttab
   * 
   * License 
   * http://creativecommons.org/licenses/by-sa/3.0/  
   */
  (function(b){b.fn.smartTab=function(j){var a=b.extend({},b.fn.smartTab.defaults,j),d=arguments;return this.each(function(){function c(k){if(e.data("isAnimating"))return!1;if(a.contentURL&&0<a.contentURL.length){var c=m.eq(k);if(a.contentCache&&c.data("hasContent"))f(k);else{var d=b("<div>Loading</div>").addClass("loader");a.autoProgress&&q();b(e).append(d);b.ajax({url:a.contentURL,type:"POST",data:{tab_index:k},dataType:"text",beforeSend:function(){d.show()},error:function(){d.hide().remove()},success:function(g){g&&
  0<g.length&&(b(c.attr("href"),e).html(g),c.data("hasContent",!0),f(k),a.autoProgress&&(q(),h()));d.hide().remove()}})}}else f(k)}function f(k){if(e.data("isAnimating"))return!1;var c=m.eq(e.data("curTabIdx")),d=m.eq(k);e.data("isAnimating",!0);a.transitionEffect=a.transitionEffect.toLowerCase();if(b.isFunction(a.onLeaveTab)&&!a.onLeaveTab.call(this,b(c)))return!1;if("hslide"==a.transitionEffect){var f,j,h,i=n.width();k>e.data("curTabIdx")?(f=0,j=-1*(i+10),h=i+10):(f=0,j=i+10,h=-2*i+10);0<c.length&&
  b(c.attr("href"),e).css("left",f).animate({left:j},a.transitionSpeed,a.transitionEasing,function(){b(this).hide()});b(d.attr("href"),e).css("left",h).width(i).show().animate({left:0},a.transitionSpeed,a.transitionEasing,function(){b(this).show();g(k,c,d)})}else if("vslide"==a.transitionEffect){n.height();var l=b(c.attr("href"),e),i=b(d.attr("href"),e);k>e.data("curTabIdx")?(f=0,j=-1*(l.height()+10),h=i.height()+10):(f=0,j=l.height()+10,h=-2*i.height()+10);0<c.length&&l.css("top",f).animate({top:j},
  a.transitionSpeed,a.transitionEasing,function(){l.hide()});i.css("top",h).show().animate({top:0},a.transitionSpeed,a.transitionEasing,function(){b(this).show();g(k,c,d)})}else"slide"==a.transitionEffect?0<c.length?b(c.attr("href"),e).slideUp(a.transitionSpeed,a.transitionEasing,function(){b(d.attr("href"),e).slideDown(a.transitionSpeed,a.transitionEasing,function(){g(k,c,d)})}):b(d.attr("href"),e).slideDown(a.transitionSpeed,a.transitionEasing,function(){b(this).show();g(k,c,d)}):"fade"==a.transitionEffect?
  b(b(c).attr("href"),e).fadeOut(a.transitionSpeed,a.transitionEasing,function(){b(b(d).attr("href"),e).fadeIn(a.transitionSpeed,a.transitionEasing);b(this).show();g(k,c,d)}):(0<c.length&&b(c.attr("href"),e).hide(),b(d.attr("href"),e).show(),g(k,c,d));return!0}function g(c,d,f){d.removeClass("sel");f.addClass("sel");e.data("curTabIdx",c);e.data("isAnimating",!1);if(a.saveState)if(d="stCurrentTab"+e.attr("id"),localStorage&&"undefined"!=typeof localStorage)try{localStorage.setItem(d,c)}catch(j){}else{var g=
  new Date;g.setTime(g.getTime()+864E5);g="; expires="+g.toGMTString();document.cookie=d+"="+c+g+"; path=/"}a.autoHeight&&n.animate({height:b(f.attr("href")).height()},a.transitionSpeed);return b.isFunction(a.onShowTab)&&!a.onShowTab.call(this,b(f))?!1:!0}function h(){e.data("autoProgressId")||e.data("autoProgressId",setInterval(t,a.progressInterval))}function q(){e.data("autoProgressId")&&(clearInterval(e.data("autoProgressId")),e.data("autoProgressId",null))}function t(){var a=e.data("curTabIdx")-
  0+1;m.length<=a&&(a=0);c(a)}var e=b(this),i=b("ul:first",e),m=b("li > a",i),n=b(".stContainer",e);e.data("options")?a=e.data("options"):e.data("options",a);if(!j||"init"===j||"object"===typeof j){b(e).addClass("stMain");b(i).addClass("tabAnchor");0==n.length&&(n=b("<div></div>").addClass("stContainer"),b(e).append(n));b(m).each(function(){var a=b(b(this).attr("href"),e);a.addClass("tabContent").hide();n.append(a)});b(m).bind("click",function(){if(m.index(this)==e.data("curTabIdx"))return!1;c(m.index(this));
  a.autoProgress&&(q(),h());return!1});a.keyNavigation&&b(document).keyup(function(b){39==b.which?(t(),a.autoProgress&&(q(),h())):37==b.which&&(b=e.data("curTabIdx")-0-1,0>b&&(b=m.length-1),c(b),a.autoProgress&&(q(),h()))});a.autoProgress&&(a.stopOnFocus&&(b(e).bind("mouseover",function(){q();return!0}),b(e).bind("mouseleave",function(){h();return!0})),h());i=a.selected;if(a.saveState){var l;var r="stCurrentTab"+e.attr("id");if(localStorage&&"undefined"!=typeof localStorage)try{l=localStorage&&localStorage.getItem(r)?
  localStorage.getItem(r):!1}catch(u){l=!1}else b:{l=r+"=";for(var r=document.cookie.split(";"),s=0;s<r.length;s++){for(var p=r[s];" "==p.charAt(0);)p=p.substring(1,p.length);if(0==p.indexOf(l)){l=p.substring(l.length,p.length);break b}}l=null}l&&(i=l)}c(i?i:0)}else{if("showTab"===j){i=Array.prototype.slice.call(d,1);if(i[0]==e.data("curTabIdx"))return!1;c(i[0]);return!0}b.error("Method "+j+" does not exist")}})};b.extend(b.easing,{def:"easeOutQuad",swing:function(j,a,d,c,f){return b.easing[b.easing.def](j,
  a,d,c,f)},easeOutQuad:function(b,a,d,c,f){return-c*(a/=f)*(a-2)+d},easeOutQuart:function(b,a,d,c,f){return-c*((a=a/f-1)*a*a*a-1)+d},easeOutQuint:function(b,a,d,c,f){return c*((a=a/f-1)*a*a*a*a+1)+d},easeInOutExpo:function(b,a,d,c,f){return 0==a?d:a==f?d+c:1>(a/=f/2)?c/2*Math.pow(2,10*(a-1))+d:c/2*(-Math.pow(2,-10*--a)+2)+d},easeInOutElastic:function(b,a,d,c,f){var b=1.70158,g=0,h=c;if(0==a)return d;if(2==(a/=f/2))return d+c;g||(g=f*0.3*1.5);h<Math.abs(c)?(h=c,b=g/4):b=g/(2*Math.PI)*Math.asin(c/h);
  return 1>a?-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*f-b)*2*Math.PI/g)+d:0.5*h*Math.pow(2,-10*(a-=1))*Math.sin((a*f-b)*2*Math.PI/g)+c+d},easeInOutBack:function(b,a,d,c,f,g){void 0==g&&(g=1.70158);return 1>(a/=f/2)?c/2*a*a*(((g*=1.525)+1)*a-g)+d:c/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+d}});b.fn.smartTab.defaults={selected:0,saveState:!0,contentURL:null,contentCache:!0,keyNavigation:!0,autoProgress:!1,progressInterval:3500,stopOnFocus:!1,transitionEffect:"none",transitionSpeed:"400",transitionEasing:"easeInOutExpo",
  orientation:"vertical",autoHeight:!0,onLeaveTab:null,onShowTab:null}})(jQuery);