/* Author:
   Nicolas Davi
*/


$(function(){	

	var $body = $('html,body'),
		$window = $(window),
		$y,
		$hh,
		$ww,
		isiPad = navigator.userAgent.match(/iPad/i) != null;
		
	
	// AU SCROLL		
	$window.scroll(function(){ resizePositions(); });	
	
	function resizePositions() {
	
		$y = $(this).scrollTop();
		$hh = $window.height();
		$ww = $window.width();
			
	}

	$('a.contactButton').click(function() {
		$body.animate({scrollTop: $("#contact").offset().top}, 1000);
		return false;
	});
	
	$('a.top').click(function() {
		$body.animate({scrollTop: 0}, 1000);
		return false;
	});
	
	
	$('section#works article').hover(function() {
		$(this).find('.cacheGreen').stop(true,true).fadeOut(200);
		$(this).find('.containerTexte').hide();
	}, function() {
		$(this).find('.cacheGreen').stop(true,true).fadeIn(400);
		$(this).find('.containerTexte').show();
	});


});








