//Master Javascript file
//version:   1.0
//author:   Bryan Lademann
//email:     hi@bryanlademann.com
//website:   http://www.bryanlademann.com

/*============================*/

// calls jQuery from Google server
google.load("jquery", "1");
//google.load("jqueryui", "1");


// fade effect for project images
// -------------------------------
var SlideShow = {};// creates an object container
SlideShow.setup = function()
{
	
	var tabs = jQuery('#tabs-nav li a') // gathers all the navigation links
	var shell = jQuery('#tabs-content'); // assigns variable to the containing element
	var images = jQuery(shell).children(); // gathers all the images 
	
	
	// onClick event behavior
	jQuery(tabs).click(function()
	{	
		jQuery('#tabs-nav li a').removeClass('active');//removes 'you are here' indicator
		jQuery(this).addClass('active');//adds 'you are here' indicator
	
		var proj = jQuery(this).attr('href'); //gathers link destination
		jQuery(images).fadeOut('fast') // when clicked previous images fade from view
		jQuery(proj).fadeIn(600); // then the new image slowly appears in 800 milliseconds
		return false; // prevents the visual dissonance when a browser jumps to an anchor link
	});
};


     


//alert('works');

//when finished loading, runs main functions
google.setOnLoadCallback(function(){
		
	SlideShow.setup();  
	
});