jQuery(document).ready(function(){
    jQuery(".tab_content").hide();
    jQuery("ul.tabs li:first").addClass("active").show();
    jQuery(".tab_content:first").show();

    jQuery("#t1").css('background','url(images/interfaz/tab_videos.png) no-repeat');
    jQuery("#t2").css('background','url(images/interfaz/tab_galeria2.png) no-repeat');
  
    jQuery("ul.tabs li").click(function(){  
        jQuery("ul.tabs li").removeClass("active");
        if(jQuery(this).attr('id')=="t1"){
            jQuery(this).css('background','url(images/interfaz/tab_videos.png) no-repeat');
            jQuery("#t2").css('background','url(images/interfaz/tab_galeria2.png) no-repeat');
        }
        if(jQuery(this).attr('id')=="t2"){
            jQuery(this).css('background','url(images/interfaz/tab_galeria.png) no-repeat');
            jQuery("#t1").css('background','url(images/interfaz/tab_videos2.png) no-repeat');
        }

        jQuery(this).addClass("active");
        jQuery(".tab_content").hide();
  
        var activeTab = jQuery(this).find("a").attr("href");
        jQuery(activeTab).fadeIn();
        return false;  
    }); 
});
