$(document).ready(function(){
	// $('.box').hide();
	$('.box:first').show();
	$('#tabs li:first a').addClass('selected');
	
	
	$('#slides #pics')
		.before('<div id="slideNav">')
		.cycle({
			fx: 'fade',
			speed: 1000,
			timeout: 7000,
			pager: '#slideNav'
	});
	
	
	
	$('#tabs a').click(function(){
		var ID = $(this).attr('id');
		$('#tabs a').removeClass('selected');
		$(this).addClass('selected');
		$('.box').hide();
		$('#' + ID + '-box').fadeIn('medium');
		return false;
	});
	
	$('.play-now.img-button').hover(function(){
		$(this).append('<span>Click to Watch</span>');
	}, function(){
		$(this).find("span:last").remove();
	});
	
	
	$('.fancybox').fancybox();

	$(".fancybox.iframe").fancybox({
		'width'				: '50%',
		'height'			: '75%',
	    'autoScale'     	: false,
	    'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});

	$(".video-fancybox").fancybox({
		'width' : 400,
		'height' : 226,
		'overlayOpacity' : 0.8,
		'overlayColor' : '#000',
		'padding' : 0,
		'margin' : 0,
		'autoDimensions' : 'false'
	});
});
