$(document).ready(function(){

	$(".play-button").hover(function() {
		$(this).children(".play-button-hover").animate({opacity: "show"}, "slow");
	}, function() {
		$(this).children(".play-button-hover").animate({opacity: "hide"}, "fast");
	});

	
	$(".next").hover(function() {
		$(this).children(".next-button").animate({opacity: "show"}, "slow");
	}, function() {
		$(this).children(".next-button").animate({opacity: "hide"}, "fast");
	});
	
	$(".prev").hover(function() {
		$(this).children(".prev-button").animate({opacity: "show"}, "slow");
	}, function() {
		$(this).children(".prev-button").animate({opacity: "hide"}, "fast");
	});
	
	$(".embed-button").click(function() {
		$(".video-tags").animate({opacity: "hide"}, "fast")
		$(".video-related").animate({opacity: "hide"}, "fast")
	    $(".video-rate").animate({opacity: "hide"}, "fast");
		$(".video-share").animate({opacity: "hide"}, "fast")
		$(".video-link").animate({opacity: "hide"}, "fast")
		$("#video-inside").animate({opacity: "hide"}, "fast");
		$(".video-embed").animate({opacity: "show"}, "fast");
	});

	$(".share-button").click(function() {
		$(".video-tags").animate({opacity: "hide"}, "fast")
		$(".video-related").animate({opacity: "hide"}, "fast")
	    $(".video-rate").animate({opacity: "hide"}, "fast");
		$(".video-link").animate({opacity: "hide"}, "fast")
		$("#video-inside").animate({opacity: "hide"}, "fast");
		$(".video-share").animate({opacity: "show"}, "fast");
	});
	$(".link-button").click(function() {
		$(".video-tags").animate({opacity: "hide"}, "fast")
		$(".video-related").animate({opacity: "hide"}, "fast")
	    $(".video-rate").animate({opacity: "hide"}, "fast");
		$("#video-inside").animate({opacity: "hide"}, "fast");
		$(".video-link").animate({opacity: "show"}, "fast");
	});

	$(".tags-button").click(function() {
		$(".video-related").animate({opacity: "hide"}, "fast")
		$("#video-inside").animate({opacity: "hide"}, "fast");
		$(".video-tags").animate({opacity: "show"}, "fast");
	});
	$(".rate-button").click(function() {
		$(".video-tags").animate({opacity: "hide"}, "fast")
		$(".video-related").animate({opacity: "hide"}, "fast")
		$("#video-inside").animate({opacity: "hide"}, "fast");
		$(".video-rate").animate({opacity: "show"}, "fast");
	});
	
	$(".related-button").click(function() {
		$("#video-inside").animate({opacity: "hide"}, "fast");
		$(".video-related").animate({opacity: "show"}, "fast");
	});
	
	$(".close").click(function() {
		$(this).parent(".video2").animate({opacity: "hide"}, "slow");
		$("#video-inside").animate({opacity: "show"}, "slow");
		$(".video-rate").animate({opacity: "hide"}, "slow");
		$(".video-tags").animate({opacity: "hide"}, "slow");
		$(".video-comment").animate({opacity: "hide"}, "slow");
		$(".video-link").animate({opacity: "hide"}, "slow");
		$(".video-share").animate({opacity: "hide"}, "slow");
		$(".video-embed").animate({opacity: "hide"}, "slow");
	});
	$(".video-button-hover").hover(function() {
		$(this).children(".video-button-hover-image").animate({opacity: "show"}, "slow");
	}, function() {
		$(this).children(".video-button-hover-image").animate({opacity: "hide"}, "fast");
	});
	$(".lights-button").click(function() {
		$(".lights").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

});