// JavaScript Document

$(document).ready(function() {
	    
	$(".logo").load(function() {
		$(this).effect("bounce", { direction:'down', distance: 30, times:3 }, 300);
		$times = 1;
	});
	$('.logo').hover(function() {
		if($times == 1) {
			$(this).effect("bounce", { direction:'down', distance: 30, times:2 }, 300);
			$times = 2;
		}
		$times = 2;
		}, function() {
			$times = 1;
	});


	$('.portfolio').delay(1000).queue(function( nxt ) {
    	$(this).effect("bounce", {  direction:'down', distance: 30, times:3 }, 300);
   	 nxt();
	});
	$('.portfolio').hover(function() {
		if($times == 1) {
			$(this).effect("bounce", { direction:'down', distance: 30, times:2 }, 300);
			$times = 2;
		}
		$times = 2;
		}, function() {
			$times = 1;
	});
	
	
	$('.youtube').hover(function () {
            var src = $(this).attr("src").match(/[^\.]+/) + "_hover.png";
            $(this).attr("src", src);
        }, function() {
            var src = $(this).attr("src").replace("_hover", "");
            $(this).attr("src", src);
	});
	
	
	$('.ftp').hover(function () {
            var src = $(this).attr("src").match(/[^\.]+/) + "_hover.png";
            $(this).attr("src", src);
        }, function() {
            var src = $(this).attr("src").replace("_hover", "");
            $(this).attr("src", src);
	});
	
	$('.contato').hover(function () {
            var src = $(this).attr("src").match(/[^\.]+/) + "_hover.png";
            $(this).attr("src", src);
        }, function() {
            var src = $(this).attr("src").replace("_hover", "");
            $(this).attr("src", src);
	});

});
