
/*----------------------------------------------

	Theme Name:parc fermé
	Theme URI:http://www.parc-ferme.net/
	Description:Gallery JavaScript　07-10-2010 (mm-dd-yyyy)
	Version:ver. 1.0

----------------------------------------------*/



$(document).ready(function(){

	$('#thumb').find('img').fadeTo(200,0.2);

	$('#thumb li').hover(
		function() {
			$(this).find('img').fadeTo(200,1);
		},
		function() {
			$(this).find('img').fadeTo(200,0.2);
	});

	$('#showCom').toggle(
		function() {
			$(this).html('hide comments ▲');
			$('#comments').slideToggle('slow');
			return false;
		},
		function() {
			$(this).html('show comments ▼');
			$('#comments').slideToggle('slow');
			return false;
		}
	);

	$('#showForm').toggle(
		function() {
			$(this).html('hide a comment form');
			$('.leaveComment').fadeIn('slow');
			return false;
		},
		function() {
			$(this).html('leave a comment');
			$('.leaveComment').fadeOut('slow');
			return false;
		}
	);

	$('#showForm,#showCom').hover(
		function() {
			$(this).addClass('hover');
		},
		function() {
			$(this).removeClass('hover');
	});

	$('#thumb-prev').find('img').fadeTo(100,0.2);

	$('#thumb-prev').hover(
		function() {
			$(this).find('img').fadeTo(400,1);
			$(this).find('a').addClass('hover');
		},
		function() {
			$(this).find('img').fadeTo(400,0.2);
			$(this).find('a').removeClass('hover');
	});

	$('#thumb-next').find('img').fadeTo(100,0.2);

	$('#thumb-next').hover(
		function() {
			$(this).find('img').fadeTo(400,1);
			$(this).find('a').addClass('hover');
		},
		function() {
			$(this).find('img').fadeTo(400,0.2);
			$(this).find('a').removeClass('hover');
	});

	/*$('.yearlyList').find('img').fadeTo(200,0.2);

	$('.yearlyList li img').hover(
		function() {
			$(this).fadeTo(200,1);
		},
		function() {
			$(this).fadeTo(200,0.2);
	});*/


	 $('.yearlyList').children().hover(function() { 
		$(this).siblings().stop().fadeTo(400,0.1); 
	  }, function() { 
		$(this).siblings().stop().fadeTo(400,1); 
	}); 

	//Full Caption Sliding (Hidden to Visible)
	$('#gallerybody').hover(function(){
		$(".cover", this).stop().animate({top:'0'},{queue:false,duration:160});
	}, function() {
		$(".cover", this).stop().animate({top:'-160px'},{queue:false,duration:160});
	});

});
