

$(function () {
						   
	// Menu
   	$('#menu li:has(ul)').hover( 
      function(e) 
      { 
         $(this).find('ul').fadeIn();
		 $(this).addClass('activo');
      }, 
      function(e) 
      { 
         $(this).find('ul').fadeOut('fast'); 
		 $(this).removeClass('activo');
      } 
   	);
	
	// Opacity img
	$(".descargas-carousel img").css('opacity','0.60');
	$(".descargas-carousel img").hover(function () { // on mouse over
		$(this).stop().animate({opacity: 1}, "normal");
	},
	function () { // on mouse out
		$(this).stop().animate({opacity: 0.60}, "normal");
	});
	
	// Colorbox
	$('.colorbox').colorbox({transition:'fade', opacity:0.85, maxWidth:'80%', maxHeight:'80%', initialWidth: '200px', initialHeight: '200px', current: "imagen {current} de {total}"});
	
	// Carouseles
    $('#productos-menu').jcarousel({scroll: 7, easing: 'easeInOutBack', animation: 1500});
	$('.descargas-carousel').jcarousel({scroll: 3, easing: 'easeOutBounce', animation: 1500});
});

// Inputs onblur,onfocus
function eFocus(field){if (field.value == field.defaultValue){field.value ='';}}
function eBlur(field){if (field.value == ''){field.value = field.defaultValue;}}

// Captcha refresh
function captchaRefresh(){rand = $.random(99999);$('#captcha_container').attr('src', '/captcha.php?'+rand)}

//acordeones
$(document).ready(function() {
	//on click slide up everything and make appear link but open the selected content and disappear link
	$(".line").click(function() {
		$("#accordion .line .line_content").slideUp();
		$("#accordion .line .clic").fadeIn();
		/*$(this).hide();*/
		$(this).find(".clic").hide();
		$(this).find(".line_content").slideDown();
		return false;
	});
	//Show first content on load.
	$("#accordion .line .line_content:first").css("display","block");
	$("#accordion .line .clic:first").css("display","none");
	
});




