Cufon.replace('.p_gear_heading h3',
				{hover: true, fontFamily: 'Gotham Light'});

Cufon.replace('.team_info_general h3.player_heading, .p_gear_heading h3 strong',
				{hover: true, fontFamily: 'Gotham Black', fontSize: '34px'});
				
Cufon.replace('h3.team_heading',
				{hover: true, fontFamily: 'Gotham Black', fontSize: '20px'});
				
Cufon.replace('#content h1, .detail_info_right .heading_block h3, .team_info_general .player_detail_info table.product_spec tr.h, h3#view_full_profile a, .player_next_prev span',
				{hover: true, fontFamily: 'Gotham Black'});
				
var $j = jQuery.noConflict();

$j(document).ready( function(){

	jQuery(".with_grey_bg").hide();
	
	jQuery('[class^=t1p]').click(function() {
		var $this = jQuery(this);
		var x = $this.attr("className");
		var y = jQuery('a.' + x).attr("id");
		
		jQuery('#team1_player_list').hide();
		jQuery('#team_player_detail_info_'+y).show();
		return false;
	});
	
	jQuery('[class^=t3p]').click(function() {
		var $this = jQuery(this);
		var x = $this.attr("className");
		var y = jQuery('a.' + x).attr("id");
		
		jQuery('#team3_player_list').hide();
		jQuery('#team_player_detail_info_'+y).show();
		return false;
	});
	
	jQuery('[class^=t4p]').click(function() {
		var $this = jQuery(this);
		var x = $this.attr("className");
		var y = jQuery('a.' + x).attr("id");
		
		jQuery('#team4_player_list').hide();
		jQuery('#team_player_detail_info_'+y).show();
		return false;
	});
	
	jQuery('[class^=t5p]').click(function() {
		var $this = jQuery(this);
		var x = $this.attr("className");
		var y = jQuery('a.' + x).attr("id");
		
		jQuery('#team5_player_list').hide();
		jQuery('#team_player_detail_info_'+y).show();
		return false;
	});
	
	jQuery('[class^=t6p]').click(function() {
		var $this = jQuery(this);
		var x = $this.attr("className");
		var y = jQuery('a.' + x).attr("id");
		
		jQuery('#team6_player_list').hide();
		jQuery('#team_player_detail_info_'+y).show();
		return false;
	});
	
	jQuery('[class^=pclose]').click(function() {
		jQuery('.with_grey_bg').hide();
		jQuery('#team1_player_list').show();
		jQuery('#team2_player_list').show();
		jQuery('#team3_player_list').show();
		jQuery('#team4_player_list').show();
		jQuery('#team5_player_list').show();
		jQuery('#team6_player_list').show();
		return false;
	});
	
	jQuery('[class^=pdclose]').click(function() {
		jQuery('.with_grey_bg').hide();
		jQuery('#team1_player_list').show();
		jQuery('#team2_player_list').show();
		jQuery('#team3_player_list').show();
		jQuery('#team4_player_list').show();
		jQuery('#team5_player_list').show();
		jQuery('#team6_player_list').show();
		return false;
	});
	
	jQuery('[class^=t2p]').click(function() {
		var $this = jQuery(this);
		var x = $this.attr("className");
		var y = jQuery('a.' + x).attr("id");
		
		jQuery('#team2_player_list').hide();
		jQuery('#team_player_detail_info_'+y).show();
		return false;
	});
	
	$j(".player_next_prev a.playa_prev").click(function(){
		var $this = $j(this);
		var id_div	=	($this.parent().parent().attr("id"));
		var arr = id_div.split("_");
		var y	=	arr[arr.length-1];
		var z	=	y-1;
		
		var total	=	document.getElementById('f1df'+y).innerHTML
		if(total	==	1)	return true;
		if(y	==	1) z=total;
		
		jQuery('#team_player_detail_info_'+y).hide();
		jQuery('#team_player_detail_info_'+z).show();
		
	});
	
	$j(".player_next_prev a.playa_next").click(function(){
		var $this = $j(this);
		var id_div	=	($this.parent().parent().attr("id"));
		var arr = id_div.split("_");
		var y	=	arr[arr.length-1];
		var z	=	parseInt(y)+1;
		
		var total	=	document.getElementById('f1df'+y).innerHTML
		if(total	==	1)	return true;
		
		if(y	==	total)  z=1;
		
		jQuery('#team_player_detail_info_'+y).hide();
		jQuery('#team_player_detail_info_'+z).show();
		
		
	});
	
	// video slider slider
	$j('#video_slider').wslide({
				width: 545,
                height: 306,
                horiz: true,
				autolink: 'vid_nav span.images',
				duration: 300
	});
	
	cufonHover($j('#rightLinks a'), 'Gotham Bold');
	Cufon.now();
});

