jQuery(document).ready(function(jQuery) {
	
	/*
	*	Visual Effects & Interaction
	*/
	// ## Thumbnail Switcher for Work:
	jQuery(".thumbnails li img").click(function(){
		var thisImage = jQuery(this).attr("class");
		var client = thisImage.split("-");
		var fullPicLi = "#" + client[0] + " .fullpics ." + thisImage;
		var otherItems = "#" + client[0] + " .fullpics li";
		jQuery(otherItems).attr("style","");
		jQuery(fullPicLi).css({"position":"absolute", "top":"0", "left":"0", "z-index":"1000"});
	});

	// ## Team Page Tag Filter
	jQuery("#tag-filter a").click(function() {
		// if (jQuery(this).attr("id") == "show-all") {
		if (jQuery(this).hasClass("active")) {
			jQuery("#tag-filter a").removeClass("active");
			jQuery(this).removeClass("active");
			jQuery("#projects .project").addClass("active");
		}
		else {
			// Disable all other active elements:
			jQuery("#tag-filter a").removeClass("active");
			jQuery("#projects .project").removeClass("active");
			// Enable matched elements:
			jQuery(this).addClass("active");
			var getTag = "." + jQuery(this).attr("id");
			jQuery("#projects .project").find(getTag).parents(".project").addClass("active");
		}
	});
	// ## Team Page Info Bubble Hovers
	jQuery("#projects li .headshot").hover(function() {
		var thisemployee = jQuery(this).parent();
		jQuery(thisemployee).css("z-index","1");
		jQuery(".infoBubble",thisemployee).fadeIn("fast");
	},
	function() {
		var thisemployee = jQuery(this).parent();
		jQuery(thisemployee).mouseleave(function(){
			jQuery(".infoBubble",this).hide();
			jQuery(thisemployee).css("z-index","0");
		});
	});

   
});
