function trace(s) {
  if (this.console && typeof console.log != "undefined")
    console.log(s);
}

$(document).ready(function()
{
	//main nav hilight
	$('#nav').find('a').hover(function()
	{
		if($(this).hasClass('active') == false)
		{
			$(this).stop().animate({'backgroundPosition': '50% 100%'},300)
		}
	},
	function()
	{
		if($(this).hasClass('active') == false)
		{
			$(this).stop().animate({'backgroundPosition': '50% 250%'},300)
		}
	})
	.click(function(){ //reset background so hilite doesn't show up on clicking back
		$(this).blur()
		$(this).css('backgroundPosition', '50% 250%')
	})
	
	

	/*Photo Gallery hover*/
	$('#gallery-head').hover(function(){
		$(this).stop().animate({'backgroundPosition': '0px 50%'},300)
	},
	function(){
		$(this).stop().animate({'backgroundPosition': '-30px 50%'},300)
	})
	.click(function(){ //reset background so hilite doesn't show up on clicking back
		$(this).blur()
		$(this).css('backgroundPosition', '-30px 50%')
	})
	
	
	$('#gallery-head-2').hover(function(){
		$(this).stop().animate({'backgroundPosition': '0px 50%'},300)
	},
	function(){
		$(this).stop().animate({'backgroundPosition': '-30px 50%'},300)
	})
	.click(function(){ //reset background so hilite doesn't show up on clicking back
		$(this).blur()
		$(this).css('backgroundPosition', '-30px 50%')
	})
	
	/*Link Hover*/
	$('#content').find('a.link').hover(function()
	{
		$(this).stop().animate({'color': '#419639'},300, function()
		{
			$(this).css('color', '#419639')	
		})
	},
	function()
	{
		$(this).stop().animate({'color': '#1A5D33'},300, function()
		{
			$(this).css('color', '#1A5D33')	
		})
	})
	
	
})//end document ready
