$(document).ready(function() {

	$("li.team span").hover(function (){
	        //alert($(this).attr('rel'));
	        $('ul.team li#' + $(this).attr('rel') + ' a').addClass("rcfcolor");
	    },function(){
	        $('ul.team li#' + $(this).attr('rel') + ' a').removeClass("rcfcolor");
	    }
	);	

	$("li.team div a img").hover(function (){
	        //$('li.team div a img#' + $(this).attr('id')).hide();
	    },function(){
	        //$('li.team a img#' + $(this).attr('id')).show();
	    }
	);	
	
	$("li.team div.personContainer").hover(function (){
	        $('li.team div a img#i_' + $(this).attr('rel')).fadeOut();
	        $('li.team div#mb_' + $(this).attr('rel') + '.memberbox').show();
	        $('li.team div#mb_' + $(this).attr('rel') + '.memberbox_right').show();
	    },function(){
	        $('li.team div a img#i_' + $(this).attr('rel')).fadeIn();
	        $('li.team div#mb_' + $(this).attr('rel') + '.memberbox').hide();
	        $('li.team div#mb_' + $(this).attr('rel') + '.memberbox_right').hide();
	    }
	);					
	
	$("ul.team li a").hover(function (){				
			$('li.team div a img#i_' + $(this).attr('rel')).fadeOut();
			$('div#mb_' + $(this).attr('rel') + '.memberbox').show();
			$('div#mb_' + $(this).attr('rel') + '.memberbox_right').show();
		}, function(){
			$('li.team div a img#i_' + $(this).attr('rel')).fadeIn();
			$('div#mb_' + $(this).attr('rel') + '.memberbox').hide();
			$('div#mb_' + $(this).attr('rel') + '.memberbox_right').hide();
		}				
	);
	
	//show all investment locations
	$("ul.invest li a").hover(function (){
	        $("div.info").hide();
   			$("div.info_try").hide();
   			
	        var locations = $(this).attr('rel');
	        var locationsArray = locations.split(", ");
	        var i=0;
			for (i=0;i<locationsArray.length;i++) {
				$('div#label_' + locationsArray[i]).hide();
				$('div#info_' + locationsArray[i]).fadeIn("slow");
				$('div#info_try_' + locationsArray[i]).fadeIn("slow");
			}
	    },function(){
	        var locations = $(this).attr('rel');
	        var locationsArray = locations.split(", ");
	        var i=0;
			for (i=0;i<locationsArray.length;i++) {
				//alert(locationsArray[i]);
				$('div#label_' + locationsArray[i]).show();
				//alert('li#info_' + locationsArray[i]);
				$('div#info_' + locationsArray[i]).hide();
				$('div#info_try_' + locationsArray[i]).hide();
			} 		    
	    }
	);
	
	//faq
	$("a.bigLink").click(function () {
		$('div#' + $(this).attr('rel')).toggle("fast");
		return false;
   	});
			
});
