/*===================================================================
	Menu System in the dropdown top section
	
	Funtion 1 
	
	1: select element and adjust CSS opacity to 0.8
===================================================================*/


$(function(){
	$(".natalie-button").css({
		opacity: 0.8
	});
	$(".billy-button").css({
		opacity: 0.8
	});
	$(".christy-button").css({
		opacity: 0.8
	});


	$("#member_profiles li.button").click(function(){
		
		$clicked = $(this);
		
		// if the button is not already "transformed" AND is not animated
		if ($clicked.css("opacity") != "1" && $clicked.is(":not(animated)")) {
			
			$clicked.animate({
				opacity: 1,
				borderWidth: 5
			}, 600 );
			
			// each button div MUST have a "xx-button" and the target div must have an id "xx" 
			var classToLoad = $clicked.attr("class").split('-');
			
			//we search trough the content for the visible div and we fade it out
			
			$("#Profile_view").find("div.profile_area:hidden").addClass('show');
			$("#Profile_view").find("div.profile_area:visible").fadeOut("fast", function(){
				//once the fade out is completed, we start to fade in the right div
				$(this).parent().find("."+classToLoad[0]).fadeIn();
			})
		}
		
		//we reset the other buttons to default style
		$clicked.siblings(".button").animate({
			opacity: 0.8,
			borderWidth: 1
		}, 600 );
		
	});
});

$(function(){
$('div#associate_logos a').click(function(){
window.open(this.href);
return false;
});
});

	//	$(function() {
	//		$('ul#gallery_menu li a').live('click', function() {
	//			$('#vlightbox').load(this.href + ' #vlightbox > *', function() {
	//				initlightbox;
	//			});return false;
	//		});
	//	});



