$(function() {
	
	// Remove accessibility stylesheet
	$('#accessibility').get(0).disabled = true;
	
	// Initialize drop down menu
	$('#navigation > li').drop_down();
	
	// Animate scrolling
	$.getScript('/javascripts/plugins/scroll-to.js', function() 
	{
		$('a[href*=#]').not('#profiles a, #navigation a').scroll_to();
	});
	
	// Profile tabs
	if ($('#profiles').length) 
	{
		$.profiles.init();
	}
	
	// Front Page Slideshow
	if ($('#slideshow').length)
	{
		$.slideshow.init();
	}
	
	// Fancybox for videos
	if ($.fn.fancybox)
	{
		$('a[rel*=fancybox], a.watch-video').fancybox({
			frameWidth: 550,
			frameHeight: 450,
			overlayOpacity: 0.5,
			hideOnContentClick: false,
			callbackOnClose: function()
			{
				$("#fancy_content").empty();
			}
		});
	}
});
