$(document).ready(function() {
  var longName = location.href
	$("#navlist li:nth-child(2)").addClass("active");
			
// Carousel setup
   $(".theCarousel").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev",
        visible: 6,
        scroll: 1
    });
// This is the jquery stuff to hide the intro & begin the callouts
	var openedUp = "no"
	$("#thumbNail img").click(function(event){
		
		var whoAmI = $(this).attr("class");
    	var openMe = "#collectionsStyle-"+whoAmI;
		var tnHide = "li a ."+whoAmI;
		$(tnHide).fadeTo("slow", 0.75);

		if (openedUp == "no"){
    		//alert(openMe);
			$("#collectionsFrame").slideUp("fast");
    		$(openMe).animate({opacity: 1.0}, 500).slideDown("slow");
    		openedUp = "yes"
    		whatsOpen = openMe
    		openTN = tnHide
    	} else {
    		$(openTN).fadeTo("slow", 1.00);
    		$(tnHide).fadeTo("slow", 0.75);
    		$(whatsOpen).animate({opacity: 1.0}, 200).slideUp("fast");
    		$(openMe).animate({opacity: 1.0}, 500).slideDown("slow");
    		whatsOpen = openMe
    		openTN = tnHide
    	}
   });
// The closer stuff	
	$("#closeX img").click(function(event){
		//alert($(this).attr("class"))
		var whoAmI = $(this).attr("class");
    	var openMe = "#collectionsStyle-"+whoAmI;
		if (openedUp == "yes"){
			$(openMe).animate({opacity: 1.0}, 200).slideUp("fast");
			$("#collectionsFrame").slideUp("fast");
			$("#collectionsFrame").animate({opacity: 1.0}, 700).slideDown("slow");
			$(openTN).fadeTo("slow", 1.00);
			openedUp = "no"
		}
	});
// Light box stuff
		$(document).ready(function() {
			/*
			*   Examples - images
			*/

			$("a#example1").fancybox();

			$("a#example2").fancybox({
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
				'titlePosition'		: 'outside',
				'overlayColor'		: '#000',
				'overlayOpacity'	: 0.75
			});

			
		});
	

// End Lightbox
// anything new goes here
});
