/*Staff Profile Lightwindows
	******************************************/
	function turnOnProfile() {
		var browserHeight = window.innerHeight;
		browserHeight = browserHeight - 150;
		
		$("#outOfTheDarkness").css("display","block");
		$("#closeMe").css("display","block");
		
		var getRelRef = $(this).attr("rel");
		
		$("#" + getRelRef).css("display","block");
		$("#" + getRelRef).css("height",browserHeight + "px");
		
		//position them
		$("#" + getRelRef).css("position","fixed");
		$("#outOfTheDarkness").css("position","fixed");
		$("#closeMe").css("position","fixed");
		
		
		//stack 'em up
		$("#outOfTheDarkness").css("z-index","50");
		$("#" + getRelRef).css("z-index","75");
		$("#closeMe").css("z-index","100");
		
		//fade it in
		$("#" + getRelRef).fadeTo(1000, 1);
	}
	
	function turnOffProfile() { setUpProfiles(); }
	
	function setUpProfiles() {
		
		//links to open profiles
		$(".seeMore").bind('click',turnOnProfile);
		$(".seeMore").click(function(event) { event.preventDefault(); });
		
		//profiles
		$(".staffProfile").fadeTo(25, 0);
		$(".staffProfile").css("display","none");
		$(".staffProfile").css("position","static");
		$(".staffProfile").css("left","50%");
		$(".staffProfile").css("top","23px");
		$(".staffProfile").css("margin-left","-325px");
		$(".staffProfile").css("z-index","0");
		$(".staffProfile").css("overflow","scroll");
		
		//Alpha Shadow Sandwhich
		$("#outOfTheDarkness").fadeTo(25, .85);
		$("#outOfTheDarkness").css("display","none");
		$("#outOfTheDarkness").css("position","static");
		$("#outOfTheDarkness").css("left","0px");
		$("#outOfTheDarkness").css("right","0px");
		$("#outOfTheDarkness").css("top","0px");
		$("#outOfTheDarkness").css("bottom","0px");
		$("#outOfTheDarkness").css("width","100%");
		$("#outOfTheDarkness").css("height","100%");
		$("#outOfTheDarkness").css("z-index","0");
		
		//Close Me Button Handling
		$("#closeMe").css("display","none");
		$("#closeMe").css("position","static");
		$("#closeMe").css("left","50%");
		$("#closeMe").css("top","10px");
		$("#closeMe").css("z-index","0");
		$("#closeMe").bind("click",turnOffProfile);
		$("#closeMe").click(function(event) { event.preventDefault(); });
	}	
	
	$("document").ready(setUpProfiles);
