$(document).ready(function(){

	$("#nav li a").css("background", "url(pic/nav-bg.jpg) repeat 0 -70px" );

	$("#nav li a").hover(function(){
	$(this).stop().animate({ 
		backgroundPosition: "(0 0)"
	   }, {duration:300}
	);},
	function(){
	$(this).stop().animate({ 
	    backgroundPosition: "(100 -70px)"
	  }, {duration:800, complete:function(){$(this).css({backgroundPosition: "0 -70px"})}} );
	});

	$('ul.ref li a').css("opacity", "0.2");
	$('ul.ref li.left').hover(function(){
		$(this).find('a').animate({left:'0px', 'opacity': '0.9'},{queue:false,duration:400});
	}, function(){
		$(this).find('a').animate({left:'182px', 'opacity': '0.2'},{queue:false,duration:400});
	});
	$('ul.ref li.top').hover(function(){
		$(this).find('a').animate({top:'0px', 'opacity': '0.9'},{queue:false,duration:300});
	}, function(){
		$(this).find('a').animate({top:'108px', 'opacity': '0.2'},{queue:false,duration:300});
	});
	
	$("#content p.hidden").hide();
	$("#content a.toggle").click(function() {
		$("#content p.hidden").slideToggle();
	})
});

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-23413335-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

