
// JavaScript Document
$(document).ready(function() {
						   
						   
	jQuery.fn.fadeIn = function(speed, callback) { 
		return this.animate({opacity: 'show'}, speed, function() { 
			if (jQuery.browser.msie)  
				this.style.removeAttribute('filter');  
			if (typeof callback == 'function')  
				callback();  
		}); 
	}; 
	 
	jQuery.fn.fadeOut = function(speed, callback) { 
		return this.animate({opacity: 'hide'}, speed, function() { 
			if (jQuery.browser.msie)  
				this.style.removeAttribute('filter');  
			if (typeof callback == 'function')  
				callback();  
		}); 
	}; 
	 
	jQuery.fn.fadeTo = function(speed,to,callback) { 
		return this.animate({opacity: to}, speed, function() { 
			if (to == 1 && jQuery.browser.msie)  
				this.style.removeAttribute('filter');  
			if (typeof callback == 'function')  
				callback();  
		}); 
	};
	
	// MENU					   
	$("#menu li").find('a').addClass("animado");
	$("#menu li").find('a').hide();
	$("#menu li").hover(function() {
		 $(this).find('a').animate({ opacity: 'show' }, 'slow');
	   },function(){
		 $(this).find('a').show();
		 $(this).find('a').animate({ opacity: 'hide' }, 'slow');
	   });	

	if(jQuery.jcarousel) {
		$('#listadoproyectos').jcarousel({
			vertical: true,
			scroll: 4
		});
		
		$('#listadoproyectos li').click(function(event) {   
			$(this).parent().find('li').removeClass("selected");
			$(this).addClass("selected");
			$("#proy").load(this.id + '.htm', function() {
				Cufon.refresh('h2');
				scroll(0,0);
			});
	   
		});
 	}



	
 });


