function fonctions(){		
		//inputs
		$("input, textarea").each(function(){
			var defaultText = $(this).val();
			
			$(this).focus(function(){
				if ($(this).val()==defaultText){
					$(this).val("");
				}
				$(this).stop(true,true).animate({backgroundColor: "#fff", color: "#34363c"}, 400, "");
			});
			
			$(this).blur(function(){
				if ($(this).val()==""){
					$(this).val(defaultText);
				}
				$(this).stop(true,true).animate({backgroundColor: "#eee", color: "#d63170"}, 400, "");
			});
		});
		
		//slideshow		
		$('#slideshow').cycle({
			fx:      'scrollDown', 
			timeout:  5000,
			speedIn:  1000, 
			speedOut: 1000,
			easeIn:  'easeInOutBack', 
			easeOut: 'easeInOutBack', 
			delay:   0
		});
		
		//projets
		$(".projet_img").each(function(){
			var imgUrl = $(this).find("p a").attr("href");
			$(this).find("a.option_apercu").attr("href", imgUrl);
			
			/*$(this).hover(function(){
				$(this).find("img").stop().animate({top: "82px"}, 400, "easeOutBack");
				$(this).parent().find(".projet_titre").stop().delay(0).animate({top: "0px"}, 400, "easeOutBack");
				$(this).parent().find(".projet_tags").stop().delay(100).animate({top: "0px"}, 400, "easeOutBack");
				$(this).parent().find("a.option_apercu").stop().delay(200).animate({top: "0px"}, 400, "easeOutBack");
				$(this).parent().find("a.option_visiter").stop().delay(300).animate({top: "0px"}, 400, "easeOutBack");
			}, function(){
				$(this).find("img").stop().animate({top: "0px"}, 400, "easeOutBack");
				$(this).parent().find("a.option_apercu, a.option_visiter").stop().animate({top: "-72px"}, 800, "easeOutBack");
				$(this).parent().find(".projet_titre, .projet_tags").stop().animate({top: "-52px"}, 800, "easeOutBack");
			});*/
			
			$(this).hover(function(){
				$(this).find("img").stop().animate({top: "82px"}, 300, "easeOutBack");
				$(this).parent().find(".projet_titre, .projet_tags, a.option_apercu, a.option_visiter")
								   .stop().animate({top: "0px"}, 300, "easeOutBack");
			}, function(){
				$(this).find("img").stop().animate({top: "0px"}, 300, "easeOutBack");
				$(this).parent().find("a.option_apercu, a.option_visiter").stop().animate({top: "-72px"}, 300, "easeOutBack");
				$(this).parent().find(".projet_titre, .projet_tags").stop().animate({top: "-52px"}, 300, "easeOutBack");
			});
			
			$("a.option_visiter").each(function(){
				if( $(this).attr("href")=="" ){
					$(this).addClass("off");
					$(this).attr("title", "");
					
					$(this).click(function(){
						return false;
					});
				}
			});
		});
		
		//fancybox
		$(".projet_img p a, .projet_img a.option_apercu").fancybox({
			'transitionIn'	:	'none',
			'transitionOut'	:	'none',
			'speedIn'		:	600, 
			'speedOut'		:	200, 
			'overlayOpacity':	0,
			'modal'			: 	false,
			'titleShow'		:	false,
			'autoScale'		:	false,
			'showNavArrows'	:	false,
			'hideOnContentClick' : true,
			'hideOnOverlayClick' : true
		});
		
		//liens
		$("a.option_visiter").each(function(){
			$(this).attr("target", "_blank");
		});
}
	
$(document).ready(function(){
	fonctions();
});