// JavaScript Document
$(document).ready(function() {
						   
	//troubleshooting tester					   
	//alert("Your momma is so fat when she jump for joy she got stuck");
	
	//hides the navigation menu on startup
	$("#animation").hide();
	$("#threed").hide();
	$("#twod").hide();
	$("#web").hide();
	$("#print").hide();
	$("#illustration").hide();
	
	//hides the other divs besides animation on startup
	$("#threedSection").hide();
	$("#twodSection").hide();
	$("#webSection").hide();
	$("#printSection").hide();
	$("#animationSection").hide();
	$("#illustrationSection").hide();
	//this will show the animation section
	
		{
		//this hides other sections
		$("#threedSection").hide();
		$("#twodSection").hide();
		$("#webSection").hide();
		$("#printSection").hide();
		$("#animationSection").hide();
	} ;
	
	//this will show the animation section
	$("#animation").click(function() {
		
		//this hides other sections
		$("#threedSection").hide();
		$("#twodSection").hide();
		$("#webSection").hide();
		$("#printSection").hide();
		$("#illustrationSection").hide();
		//this will show threed div
		$("#animationSection").fadeIn(200);
	});
	
	//this will show the threed section
	$("#threed").click(function() {
		
		//this hides other sections
		$("#animationSection").hide();
		$("#twodSection").hide();
		$("#webSection").hide();
		$("#printSection").hide();
		$("#illustrationSection").hide();
		//this will show threed div
		$("#threedSection").fadeIn(200);
	});
	
	//this will show the twod section
	$("#twod").click(function() {
		
		//this hides other sections
		$("#animationSection").hide();
		$("#threedSection").hide();
		$("#webSection").hide();
		$("#printSection").hide();
		$("#illustrationSection").hide();
		//this will show twod div
		$("#twodSection").fadeIn(200);
	});
	
	//this will show the web section
	$("#web").click(function() {
		
		//this hides other sections
		$("#animationSection").hide();
		$("#twodSection").hide();
		$("#threedSection").hide();
		$("#printSection").hide();
		$("#illustrationSection").hide();
		//this will show web div
		$("#webSection").fadeIn(200);
	});
	
	//this will show the print section
	$("#print").click(function() {
		
		//this hides other sections
		$("#animationSection").hide();
		$("#threedSection").hide();
		$("#webSection").hide();
		$("#twodSection").hide();
		$("#illustrationSection").hide();
		//this will show web div
		$("#printSection").fadeIn(200);
	});	
	
		//this will show the illustration section
	$("#illustration").click(function() {
		
		//this hides other sections
		$("#animationSection").hide();
		$("#threedSection").hide();
		$("#webSection").hide();
		$("#twodSection").hide();
		$("#printSection").hide();
		//this will show web div
		$("#illustrationSection").fadeIn(200);
	});	
	
	//this is for show/hide of the navigation menu
	$("#nav").toggle(function() { 
		// state A
		$("#animation").fadeIn(500);
		$("#threed").fadeIn(500);
		$("#twod").fadeIn(500);
		$("#web").fadeIn(500);
		$("#print").fadeIn(500);
		$("#illustration").fadeIn(500);
	} , function() { //the comma differentiates the two states
		// state B
		$("#animation").fadeOut(500);
		$("#threed").fadeOut(500);
		$("#twod").fadeOut(500);
		$("#web").fadeOut(500);
		$("#print").fadeOut(500);
		$("#illustration").fadeOut(500);
		$("#animationSection").hide();
		$("#threedSection").hide();
		$("#webSection").hide();
		$("#twodSection").hide();
		$("#printSection").hide();
		$("#illustrationSection").hide();
	});
	
	//this is the code for lightbox gallery
	$(function() {
	// Use this example, or...
	$('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
	// This, or...
	//$('#gallery a').lightBox(); // Select all links in object with gallery ID
	// This, or...
	//$('a.lightbox').lightBox(); // Select all links with lightbox class
	// This, or...
	//$('a').lightBox(); // Select all links in the page
	});
	
});