jQuery.fn.fadeToggle = function(speed, easing, callback) {
  return this.animate({opacity: 'toggle'}, speed, easing, callback);  
};

$(document).ready(
	function(){		    				
		
		$(".link").hover(
			function(){				
				$(this).attr("src",$(this).attr("src").replace('.png','') + '_over.png');								
			}
			,
			function(){				
				$(this).attr("src",$(this).attr("src").replace('_over',''));				
			}
		);
		
		if ($('#Slides').length > 0) {
			$('#Slides').cycle({ 
				fx: 'scrollHorz',
				speed: 750,
				timeout: 5000, 
				randomizeEffects: false, 
				easing: 'easeOutCubic',
				next:   '.slideNext', 
				prev:   '.slidePrev',
				pager:  '#slidePager',
				cleartypeNoBg: true
			});
		}
		
		if ($('#portfolio').length > 0) {
			$('#portfolio').cycle({ 
				fx: 'scrollHorz',
				speed: 750,
				timeout: 3000, 
				randomizeEffects: false, 
				easing: 'easeOutCubic',
				next:   '#portfolioNext', 
				prev:   '#portfolioPrev',				
				cleartypeNoBg: true
			});
		}						
		
		$("#contacto").fancybox({
			'titleShow'     : false,
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
  							
		
	}
);
