/* TAB */

$(function() {
	var tabContainers = $('div.tabs > div');
	tabContainers.hide().filter(':first').show();

	$('div.tabs ul.tabNavigation a').click(function() {
		tabContainers.hide();
		tabContainers.filter(this.hash).show();
		$('div.tabs ul.tabNavigation a').removeClass('selected');
		$(this).addClass('selected');
		return false;
	}).filter(':first').click();
});

function clearText(field) {
	if (field.defaultValue == field.value) field.value = '';
	else if (field.value == '') field.value = field.defaultValue;

}


/* MOSTPOP */

$(function () {
	var tabContainers = $('div.mostpop div.content');
	tabContainers.hide().filter(':first').show();
	
	$('div.idTabs a').click(function () {
			tabContainers.hide();
			tabContainers.filter(this.hash).show();
			$('div.idTabs a').removeClass('active');
			$(this).addClass('active');
			return false;
	}).filter(':first').click();
});


/* NEWS */


$(function () {
	var tabContainers = $('ul.newss');
	tabContainers.hide().filter(':first').show();
	
	$('div.newtab a').click(function () {
			tabContainers.hide();
			tabContainers.filter(this.hash).show();
			$('div.newtab a').removeClass('active');
			$(this).addClass('active');
			return false;
	}).filter(':first').click();
});


/* HUGE VIDEO LIST */


jQuery(document).ready(function() {

	jQuery('.hugevideolist').jcarousel({scroll: 3});

	$(function(){
		$("ul.hugevideolist>li").hover(function(){
			$("div.hoverme", this).stop().animate({bottom:"0px"},{queue:false,duration:200});
		}, function() {
			$("div.hoverme", this).stop().animate({bottom:"-20px"},{queue:false,duration:200});
		});
	});


});

$(document).ready(function(){
	$("img.play").fadeTo("fast", 0.6); 

	$("ul.hugevideolist>li").hover(function(){
		$("img.play", this).fadeTo("fast", 1.0); 
	},function(){
   		$("img.play", this).fadeTo("fast", 0.6); 
	});
});

$(document).ready(function(){
	$("div.hoverme").fadeTo("fast", 0.4); 

	$("ul.hugevideolist>li").hover(function(){
		$("div.hoverme", this).fadeTo("fast", 1.0); 
	},function(){
   		$("div.hoverme", this).fadeTo("fast", 0.4); 
	});
});