jQuery.noConflict();

jQuery(function() {

	// Nav mouseovers
	jQuery('#nav li a').hover(
		function() {
			jQuery(this).children('img').attr('src',baseUrl + '/img/nav/1/' + jQuery(this).attr('rel') + '.png');
		},
		function() {
			var n = (jQuery(this).attr('rel') == uriPart) ? '1' : '0';
			jQuery(this).children('img').attr('src',baseUrl + '/img/nav/' + n + '/' + jQuery(this).attr('rel') + '.png');
		}
	);
	
	// NEWS: display first item on initial load
	if (typeof id != "undefined") {
		jQuery('#news_panels li#news_item_' + id).addClass('current');
		jQuery('#news_slides li').hide();
		jQuery('#news_slides li#news_images_' + id).show();
	}
	
	// NEWS: panel interactivity
	jQuery('#news_panels li h3').click(
		function() {
			// Get ID number for news_slides
			var elem_id = jQuery(this).parent().attr('id');
			var id = elem_id.substring(elem_id.lastIndexOf('_')+1,elem_id.length);
			if (jQuery(this).parent().hasClass('current') == false) {
				// Animate news item selection
				jQuery('#news_panels li.current').animate({height:'20px'},500).removeClass('current');
				jQuery(this).parent().animate({height:'320px'},500).addClass('current');
				// Fade in news_slides
				jQuery('#news_slides li').fadeOut();
				jQuery('#news_slides li#news_images_'+id).fadeIn();
			}
		}
	);
	
	// STAFF: display bios
	jQuery('#people_list a').click(
		function() {
			jQuery('#people_bios li').removeClass('current');
			jQuery('#' + jQuery(this).attr('rel')).addClass('current');
		}
	);
		
});
