
jQuery(function(){

	/* Frame Breaker */
	if(top.location!=this.location) top.location=this.location;
	

	/* RED ESPINLOG DROPDOWN MENU */

	jQuery("ul#dropdown li:even").addClass("alt");
	
    jQuery('span#dropdown_head').click(function () {
		jQuery('span#dropdown_head').addClass("active");
		jQuery('ul#dropdown').slideDown('medium');
    });
	
	jQuery("span#dropdown_head").hover( function() {
		jQuery('span#dropdown_head').addClass("hover");
	}, function() {
		jQuery('span#dropdown_head').removeClass("hover");
	});
	
	jQuery("#dropdown_container").hover( function() {
	}, function() {
		jQuery("ul#dropdown").slideUp("fast", function () {
			jQuery('span#dropdown_head').removeClass("active");
		});
	});

	jQuery('ul#dropdown li a').mouseover(function () {
		jQuery(this).stop().animate({ paddingLeft: "20px" }, "fast" );
    });
	
	jQuery('ul#dropdown li a').mouseout(function () {
		jQuery(this).stop().animate({ paddingLeft: "10px" }, "fast" );
    });
	
	
	
	/* TABMENU */
	
	//Get all the LI from the #tabMenu UL
	jQuery('#tabMenu > li').click(function() {
		
		//remove the selected class from all LI    
		jQuery('#tabMenu > li').removeClass('selected');
		
		//Reassign the LI
		jQuery(this).addClass('selected');
		
		//Hide all the DIV in .boxBody
		//jQuery('.boxBody div').animate({
		//	height: "0%",
		//	opacity: 0
		//});
		jQuery('.boxBody div').slideUp();
		
		//Look for the right DIV in boxBody according to the Navigation UL index, therefore, the arrangement is very important.
		//jQuery('.boxBody div:eq(' + jQuery('#tabMenu > li').index(this) + ')').animate({
		//	height: "100%",
		//	opacity: 1
		//});
		jQuery('.boxBody div:eq(' + jQuery('#tabMenu > li').index(this) + ')').slideDown();
		
	}).mouseover(function() { //Add and remove class
		jQuery(this).addClass('mouseover');
		jQuery(this).removeClass('mouseout');   
	}).mouseout(function() { //Add and remove class
		jQuery(this).addClass('mouseout');
		jQuery(this).removeClass('mouseover');      
	});
	
	
	
	/* FOOTER */
	
	// Click en todo el LI para la seccion Participa
	
	jQuery("#footer-participa li").css("cursor", "pointer");
	jQuery("#footer-participa li:hover a").css("color", "#AAA");
	
	jQuery("#footer-participa li").click(function() {
	  window.location=jQuery(this).find("a").attr("href"); return false;
	});

	
});
