$(document).ready(function() {

//	FancyBox settings
$("a.fbox").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	500, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'overlayOpacity':	0,
		'titlePosition' :	'inside',
		'titleShow' 	:	true
	});	

$(".video").click(function() {
	$.fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	500, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'overlayOpacity':	0,
			'title'			: this.title,
			'width'			: 640,
			'height'		: 385,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			'wmode'			: 'transparent',
			'allowfullscreen'	: 'true'
			}
		});

	return false;
});
// 	Add the load class to these elements
// $(".three-board a, .one-board a, .one-board-thumbs a, #team-nav li a").addClass("load");
// 	
// 	Team add/remove class
// $('#team-nav a').click(function () {
//       $('.team-active').removeClass('team-active');
//       $(this).addClass('team-active');
// 	});
// 
$('.rider-photos').click(function () {
      $('.hidden').removeClass('hidden');
      $('#team-qa, #team-videos').addClass('hidden');
	});

$('.rider-videos').click(function () {
      $('.hidden').removeClass('hidden');
      $('#team-qa, #team-photos').addClass('hidden');
	});

$('.rider-qa').click(function () {
      $('.hidden').removeClass('hidden');
      $('#team-videos, #team-photos').addClass('hidden');
	});
	
// Sub-nav-active class from href (moved to products-sub-nav.html) 
// 		$("li a").filter(function() {
//     	return this.href === document.location.href;
// 		}).addClass("sub-nav-active");

//Fade in images	
//	$("img").hide();
//  $("img").bind("load", function () { $(this).fadeIn(); });

// the end	
	});


