/**
 * @author Paul
 */
// JavaScript Document

$(document).ready(function(){
						   
	$('.member img').css({ 'width' : '60px', 'height' : '70px' });	
	$('.type').css({ 'display' : 'none' });
	$('.member').click(function() {
	
		var id ="#" + $(this).attr("id");
		
		var imgSelector = id + ' > img';
		iHeight = $(imgSelector).height();
		
		if(iHeight == 70) {
			typeSlideDown(id);
			$(imgSelector).animate({ width : '90px', height : '100px' }, 400);
			iHeight = $(imgSelector).height();
		
		} else if (iHeight == 100){
			typeSlideUp(id);
			$(imgSelector).animate({ width : '60px', height : '70px' }, 400);

		}
		
	});
	
	function typeSlideDown(i) {
		
		var strSelector = i + ' > .info > .type';

		$(strSelector).slideDown(400);

	}
	
	function typeSlideUp(i) {
		
		var strSelector = i + ' > .info > .type';

		$(strSelector).slideUp(400);

	}
	
	$('#closeAll').click(function() {
		
		$('.type').slideUp(400);
		$('.member img').animate({ width : '60px', height : '70px' }, 400);

		
	});
	
	$('#openAll').click(function() {
		
		$('.type').slideDown(400);
		$('.member img').animate({ width : '90px', height : '100px' }, 400);
		
	});
									 
});