function fonctions(){
		//load
		$(".bloc_projet").find("a.permalink.").animate({'opacity': '0'}, 1, '');
		
		//slideshow
		function slideshow(){
			$('#show .thumb .slideshow').cycle({
				fx:      'fade',
				timeout:  5000,
				speedIn:  1000,
				speedOut: 1000,
				easeIn:   '',
				easeOut:  '',
				delay:    0
			});
			
			$(".slide_prev").click(function(){
				$('#show .thumb .slideshow').cycle('prev');
				return false;
			});
			
			$(".slide_next").click(function(){
				$('#show .thumb .slideshow').cycle('next');
				return false;
			});
		}
		
		slideshow();
		
		//projet
		$(".bloc_projet:even").addClass("even");
		$(".bloc_projet:odd").addClass("odd");
		
		//$(".min").parent().parent().find(".meta ul li:first").remove();
		
		//menu
		$("#menu li:first").addClass("first-menu");
		
		//cat
		$("#cat li a").each(function(){
			$("#cat li a:first").addClass("current-cat");
			var cat = $(this).text();
			$(this).parent("li").addClass(cat);
			$(this).attr("href", "#");
			$(this).click(function(){
				if ($(this).hasClass("current-cat")){
					return false;
				} else {
					$(".bloc_projet").find("a.permalink.").animate({'opacity': '0'}, 200, '');
					$(".bloc_projet").removeClass("select-projet");
					$(".bloc_projet").not(".bloc_projet."+cat).find("a.permalink.").animate({'opacity': '0.7'}, 200, '');
					$(".bloc_projet."+cat).addClass("select-projet");
				}
				$("#cat li a").removeClass("current-cat");
				$(this).addClass("current-cat");
			});
		});
		
		$("#cat li:first, #liens_footer li:first").addClass("first-cat");
		$(".bloc_projet").addClass("select-projet");
		
		//back
		$("#back").click(function(){
			history.back();
		});
		
		//fancybox
		$("#show .thumb #zoom").fancybox({
			'transitionIn'	:	'none',
			'transitionOut'	:	'none',
			'speedIn'		:	600, 
			'speedOut'		:	200, 
			'overlayOpacity':	0,
			'modal'			: 	false,
			'titleShow'		:	false,
			'autoScale'		:	false,
			'showNavArrows'	:	false,
			'hideOnContentClick' : true,
			'hideOnOverlayClick' : true
		});
		
		//liens
		$("#mvdesign, .description p a").attr("target", "_blank");
}
	
$(document).ready(function(){
	fonctions();
});
