$(window).load(function(){
	
	

//********* PORTFOLIO ********/
	
	$('.lien-portfolio').click(function(){
		var tab = new Object();
		tab["id"] = $(this).attr('id');
		$.ajax({
				type:'POST',
				url:'wp-content/themes/reumi.fr/chargerArticle.php',
				data:tab,
				success:function(msg) {
					if($('#aff_gauche').html() != '')
					{
						$('#aff_gauche').fadeOut(200,
																		'swing',
																		function() 
																		{
																			$('#aff_gauche').html(msg).fadeIn(200);
																			Shadowbox.clearCache();
																			Shadowbox.setup();
																			$('.apercu-folio').hide().load(function(){
																																		$(this).show('drop',600).fadeIn(600);
																																		});
																		});
					}
					else
					{
						$('#aff_gauche').fadeOut(0).html(msg).fadeIn(200);
						Shadowbox.clearCache();	
						Shadowbox.setup()	;
						$('.apercu-folio').hide().load(function(){
																						$(this).show('drop',600).fadeIn(600);
																						});			
					}
					
				}
		});
		return false;
	});
		
	/****** CONTACT  *****/
	$('.wpcf7-submit').mouseover(function(){
		$(this).animate({backgroundColor:'#FFF'},200).animate({color:'#BD62F1'},200);
		$(this).css('border','#BD62F1 1px solid');
	});
		$('.wpcf7-submit').mouseout(function(){
		$(this).animate({backgroundColor:'#3b3c3c'},200).animate({color:'#FFF'},200);
		$(this).css('border','#FFF 1px solid');
	});
	
});
