//Smooth Scroll
$(document).ready(function(){
    $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 1000);
                return false;   
            }   
        } 
    }); 
});
//menu fade
$(document).ready(function() {
	$("ul#menuFade li").hover(function() { //On hover...
		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'
		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
		//Animate the image to 0 opacity (fade it out)
		$(this).find("span").stop().fadeTo('normal', 0 , function() {
			$(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
		$(this).find("span").stop().fadeTo('normal', 1).show();
	});

});
//noticias fade
$(document).ready( function(){
	$('#news').innerfade({
		animationtype: 'fade',
		speed: 1000,
		timeout: 4000,
		type: 'random', 
		containerheight: '2em'
	});
	$('#statsFade').innerfade({
		animationtype: 'fade',
		speed: 1000,
		timeout: 6000,
		type: 'sequence', 
		containerheight: '20px'
	});
} );

//boton efecto salta
function botonSalta(clase){
$(document).ready(function(){
		$("."+clase).hover(function() {
			$(this).animate({ 
				height: "100px",
				top: "100px",
		  }, 300 );
			$(this).animate({ 
				top: "150px",
				height: "100px",
		  }, 300 );
		},
		function() {
			$(this).animate({ 
				top: "100px",
				height: "100px",
		  }, 250 );
			$(this).animate({ 
				top: "150px",
				height: "50px",
		  }, 200 );
		});
	});
}
botonSalta("feis");
botonSalta("youtube");
botonSalta("twitter");


//reflejo
document.ready(function() {
        var options = { opacity: 0.75 };
        $('.reflect').reflect(options);
});