
$(document).ready(function() {




	
$(function() {

// select the thumbnails and make them trigger our overlay
$("#triggers a").overlay({

	// each trigger uses the same overlay with the id "gallery"
	target: '#gallery',

	// optional exposing effect
	expose: '#000'

// let the gallery plugin do its magic!
}).gallery({

	// the plugin accepts its own set of configuration options
	speed: 800
});
});
	
	
	
	//Do IE6 stuff - relates to changing pic of active menu item and changing page
	if ($.browser.msie && $.browser.version.substr(0,1)<7) {

	//alert("IE6 damn it");	 
	 
		$('.ie6hover').hover(			
			
			function() 
			{				
			prevpos = ($(this).css('background-position-y'));
				if(prevpos == "-160px")
				{
					//alert("is active");
				}
				else
				{
					$(this).css("background-position", "0px -80px");
					
				}
				
			}, function() 
			{
			prevpos = ($(this).css('background-position-y'));
				if(prevpos == "-160px")
				{
					//alert("is active");
				}
				else
				{
					$(this).css("background-position", "0px 0px");	
					
				}
			}
		);
		
		
		/*needed to manually move background in IE6 because toggling class wouldnt work with png fix for some hideous reason*/
			
		$("#homenav").click(function() 
		{
			window.location = "index.php";
			return false;
					
		});
		
		
		$("#galnav").click(function() 
		{
			window.location = "index.php#gall";
			return false;
					
					
		});
		
		
		$("#artisnav").click(function() 
		{
			window.location = "index.php#cove";
			return false;		
		});
			
		
		$("#philnav").click(function() 
		{
			window.location = "index.php#phil";
			return false;
				
		});
		
		
		//activate pngfix for ie6
		//$(document).pngFix(); 
		
		
		//this png fix supports png background position
		DD_belatedPNG.fix('.png_bg, .close, .squig2, .squig1');

		
	
	}
	else
	{			
		$("#homenav").click(function() 
		{
			window.location = "index.php";
			return false;		
		});


		$("#galnav").click(function() 
		{
			
			window.location = "index.php#gall";
			return false;
					
		});


		$("#artisnav").click(function() 
		{
			window.location = "index.php#cove";
			return false;
		});

		$("#philnav").click(function() 
		{			
			window.location = "index.php#phil";
			return false;
		});

	
	}
	

});




