/* jQuery Sitewide Stuff */

	$(document).ready(function() {
		
		// Handles the large and small video layer window using colorbox (http://colorpowered.com/colorbox/)
		$('a.video-large').colorbox({transition:'elastic', speed:500, width:570, height:610, iframe: true});
		$('a.video').colorbox({transition:'elastic', speed:500, width:415, height:500, iframe: true});
		
		// Handles the attachment enlarging in the forum
		$('a.attachment').colorbox({photo:true, transition:'elastic', speed:500});
		
		// Hides the videos and forum subnavs
		$('#Layer1').hide();
		$('#Layer2').hide();
		
		// Shows the video subnav
		$('li a.videos').hover(function() {
			$('#Layer1').slideDown('fast')
			return false;
		});
		
		// Hide video subnav when it's not active
		$('ul.tabs.khtabs li a:not(.videos)').mouseover(function() {
			$('#Layer1').slideUp('fast');
		});
		
		// Shows the forum subnav
		$('li a.community').hover(function() {
			$('#Layer2').slideDown('fast')
			return false;
		});
		
		// Hide forum subnav when it's not active
		$('ul.tabs.khtabs li a:not(.community)').mouseover(function() {
			$('#Layer2').slideUp('fast');
		});
		
		
	});
