$(document).ready(function(){
	var file = $.url().attr('file');
	$('#nav a').each(function(){							  
		var nav = $(this).attr('href');
		if (file == nav) {
			//show parent menu
			$(this).parent().next('ul').css({'display':'block'});
			//show child menus
			$(this).parents('ul').css({'display':'block'});
			$(this).css({'color':'#000'});
			//makes parent ul black 
			$(this).parent().parent().prev().contents().css({'color':'#000'});
			//$(this).attr('href', '');
		}
	});	
	/* PNG issues on IE */
	/* $('#footer a img, .staff a img').fadeTo(0, 0.7); */
});

$('.redirect').click(function(){	
	var page = $(this).attr('id');
	window.location = page+'.php';
});

/* image links */
$('#header a img, #container a img').bind({
	mouseenter: function() {
		$(this).fadeTo(300, 0.7);
	},
	mouseleave: function() {
		$(this).fadeTo(300, 1);
	}
});

/* footer image links */
/* PNG ISSUES on IE
$('#footer a img, .staff a img').bind({
	mouseenter: function() {
		$(this).fadeTo(150, 1);
	},
	mouseleave: function() {
		$(this).fadeTo(150, 0.7);
	}
});
*/

/* google analytics */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-15813263-20']);
_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);
})();
