﻿$(document).ready(function(){var indiceSeleccionado=0;var pestanas=$(".pestanas-encabezado li");var contenidos=$(".pestanas-contenedor .pestanas-contenido");$(pestanas[indiceSeleccionado]).addClass("pestana-seleccionada");$(contenidos[indiceSeleccionado]).show();$(".pestanas-encabezado a, .pestanas-contenedor .pestanas-contenido").each(function(index){$(this).attr("indice",index)});$(".pestanas-encabezado a").click(function(e){e.preventDefault();var indice=$(this).attr("indice");if(indice!=indiceSeleccionado){$(pestanas[indiceSeleccionado]).toggleClass("pestana-seleccionada");$(contenidos[indiceSeleccionado]).hide();indiceSeleccionado=indice;$(pestanas[indiceSeleccionado]).toggleClass("pestana-seleccionada");$(contenidos[indiceSeleccionado]).fadeIn("slow")}})});