// JavaScript Document
$(document).ready(function() {
	var m1=new Boolean(false);
	function fadeUp(){
		$(this).fadeTo("slow", 1.0);
	}
	function fadeDown(){
		$(this).fadeTo("slow", 0.3);
	}
						   var config = {    
     sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
     interval: 200, // number = milliseconds for onMouseOver polling interval    
     over: fadeUp, // function = onMouseOver callback (REQUIRED)    
     timeout: 500, // number = milliseconds delay before onMouseOut    
     out: fadeDown // function = onMouseOut callback (REQUIRED)    
};

		$("#thumbphoto img").fadeTo("fast", 0.3); // This sets the opacity of the thumbs to fade down to 30% when the page loads

	$("#thumbphoto img").hoverIntent(config);
	
	

   $("#info").hide();
   $("#more").click(function() {
							 
	if (m1==false){
		m1=true;
     $("#info").show("slow");
	 $("#more").html("Less Info");
	 
	 
		} else {
		m1=false; 
		$("#info").hide("slow");
	 $("#more").html("More Info");	
		 }
   });
   $(window).resize(function() {
							 m1=false; 
		closeTheInfo();	
	});
   //var m1=new Boolean(false);
			//Activate FancyBox
			$("p#test2 a").fancybox({
				'zoomSpeedIn':	0, 
				'zoomSpeedOut':	0, 
				'overlayShow':	true
			});
			
			$("a#slideshow_1").fancybox({
				'overlayShow':	true,
				'overlayOpacity':.9,
				'itemLoadCallback': getGroupItemsA
			});
			$("a#slideshow_2").fancybox({
				'overlayShow':	true,
				'overlayOpacity':.9,
				'itemLoadCallback': getGroupItemsB
			});
			$("a#slideshow_3").fancybox({
				'overlayShow':	true,
				'overlayOpacity':.9,
				'itemLoadCallback': getGroupItemsC
			});
			
			
			
		
		});

		//List can contain mixed media too
		//Parameter "o" ir optional and used to override settings, example: {url: "http://www.google.com", title: false,  o: {'frameWidth': 200} }
		//imagelists go here - moved to individual pages

		
		// imagelists end here
		function closeTheInfo(){
			m1=false; 
		$("#info").hide("fast");
		$("#more").html("More Info");
		}
		function getGroupItemsA(opts) {
			jQuery.each(imageListA, function(i, val) {
		        opts.itemArray.push(val);
		    });
			closeTheInfo();
		}
		function getGroupItemsB(opts) {
			jQuery.each(imageListB, function(i, val) {
		        opts.itemArray.push(val);
		    });
			closeTheInfo();
		}
		function getGroupItemsC(opts) {
			jQuery.each(imageListC, function(i, val) {
		        opts.itemArray.push(val);
		    });
			closeTheInfo();
		}
		