// funcion_para noticia/agenda


function  cambioagnd(){
	
	$("#agend").removeClass("select");
	$("#group_agend").hide();
	$("#group_not").show();
	$("#not").addClass("select");
}


function  cambioanot(){
	
	$("#not").removeClass("select");
	$("#group_not").hide();
	$("#group_agend").show();
	$("#agend").addClass("select");
	
	
}

 function formatText(index, panel) {
		  return index + "";
	    }    
        $(function () {
					
			//  type1
			
               $('#type1').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 8000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 600,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
        		navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump").click(function(){
                 $('#type1').anythingSlider(6);
            });
			
			//type2
			
			  $('#type2').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: false,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 2000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 800,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
        		navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump").click(function(){
                $('#type2').anythingSlider(6);
            });
			
			//type3
			
			   $('#type3').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: false,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 2000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 800,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
        		navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump").click(function(){
                $('#type3').anythingSlider(6);
            });
			
			//type3 pantalla 18
			
			   $('.type3').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: false,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 2000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 800,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
        		navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump").click(function(){
                $('.type3').anythingSlider(6);
            });
			
			
        });
		
		

// Colapsable

 var valor = new Boolean(); 
  var valor1 = new Boolean();
function desplegartodos(id_d)
{
    if (valor == false) {
	
	
		for (i = 1; i <id_d; i++) {
			$('#cont' + i).slideToggle("slow", function(){
			});
			$('#tit_js' + i).toggleClass("tit_content");
		}
		
		
		$("#first_box").removeClass("selected");
		$("#first_box a").click(function(){
		});
		$("#second_box").addClass("selected");
		
		
		
	}
	
		valor = true;
		valor1 = false;
		return valor;  
		return valor1;  
		  
    
 }
 
 
 function cerrartodos(id_d)
{
    if (valor1 == false) {
	
	
		for (i = 1; i <id_d; i++) {
			$('#cont' + i).slideToggle("slow", function(){
			});
			$('#tit_js' + i).toggleClass("tit_content");
		}
		
		
		$("#first_box").removeClass("selected");
		$("#first_box a").click(function(){
		});
		$("#second_box").addClass("selected");
		
		
		
	}
	
		valor = false;
		valor1 = true;
		return valor;
		return valor1;
		    
    
 }

// Para  los apartados de primer niivel

function colapsa(id1,id2){
	$("#"+id2).slideToggle("slow",function() {});
	$("#"+id1).toggleClass("tit_content");
}
// Para  los apartados de segundo niivel

function colapsa_sub(idb1,idb2){
	$("#"+idb2).slideToggle("slow",function() {});
	$("#"+idb1+" a").toggleClass("select");
}


// Para  los apartados de tercer niivel

function colapsa_sub2(idc1,idc2){
	$("#"+idc2).slideToggle("slow",function() {});
	$("#"+idc1+" a").toggleClass("select");
}

// Para el menu vertical 

function list_colapsa(list1,list2){
	
	$("#"+list2).slideToggle("slow",function() {});
	
		$("#"+list1).toggleClass("selected");
		
}



