jQuery(document).ready(function($){
	$('#navigation li').hover(
		function() {
			if ($(this).find('.dd').length) {
				$(this).find('a').eq(0).addClass('hover');
				$(this).find('.dd').show();
			};
		},
		function() {
			if ($(this).find('.dd').length) {
				$(this).find('.dd').hide();
				$(this).find('a').eq(0).removeClass('hover');
			};
		}
	);
	
	$('.btn').wrapInner('<span />');	
	
	$('#navigation .dd ul').before('<div class="dd-top">&nbsp;</div>').after('<div class="dd-bottom">&nbsp;</div>');
	$('#navigation .dd ul li:last').addClass('last');	
	
/*	$('#navigation .newsletter-link').click(function() {
		$('#navigation .newsletter-link #signupform').stop().animate({opacity: 1, height: 200}, 1000);
		$(this).addClass('active');
	
	});*/
	
	$('#navigation .newsletter-link').click(function() {
		if ($(this).hasClass('active')) {
			$('#navigation .newsletter-link #signupform').stop().animate({opacity: 0, height: 0}, 400).animate({padding: 0}, 100);
			$(this).removeClass('active');
		}else{
			$('#navigation .newsletter-link #signupform').stop().css({ 'padding' : '10px' }).animate({height: 215, opacity: 1}, 600);
			$(this).addClass('active');
    	return;}
	});
	
	$('.latestUPDATESbtn').click(function() {
		$('.latestUpdatesBTNdiv #signupform').fadeIn('slow');
	});
	$('.latestUpdatesBTNdiv #signupform .closeBTN').click(function() {
		$('.latestUpdatesBTNdiv #signupform').fadeOut('slow');
	});
	
	jQuery('.tab-box .head li a').click(function() {
		
		jQuery('.tab-box .head li a').removeClass('active');
		jQuery(this).addClass('active');
		
		var href = jQuery(this).attr('href');
		jQuery('.tab-box .tab').hide();
		jQuery(href).show();
		
		$('.video-box > iframe').show();
		
		if (href=='#tab-archives') {
			jQuery('#player').hide();
			jQuery('#player2').show();
			$('.video-box > iframe').hide();
		};
		if (href=='#tab-chat') {
			jQuery('#player2').hide();
			jQuery('#player').show();
		};
		
		return false;
	});
	
	
	
})(jQuery);



