$(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");
	});
	
	
	$(".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;
	});

});

$(document).ready(function(){

	$(".thumbnail-div .info-button").click(function(){
	  $(this).prev(".info").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});


	$(".bar .rating").click(function(){
	  $(this).prev(".ratingbox").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});
	
	$(".post-wrapper .lightboxclick").click(function(){
	  $(this).prev(".lightbox").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});

});
$(document).ready(function(){

	$(".ratingbox .delete").click(function(){
	  $(this).parents(".ratingbox").animate({ opacity: "hide" }, "slow");
	});

});
$(document).ready(function(){

	$(".lightbox .lightboxdelete").click(function(){
	  $(this).parents(".lightbox").animate({ opacity: "hide" }, "slow");
	});

});
	var query = new Object();
	window.location.search.replace(
	new RegExp( "([^?=&]+)(=([^&]*))?", 'g' ),
		function( $0, $1, $2, $3 ){
			query[ $1 ] = $3;
		}
	);
	easing = query['e'] || 'Circ';
	
	function loadEasing(e) {
		location.href = location.pathname+'?e='+e;
	}
	
	function setEasing(e) {
		loadLamps(e);
	}

// for dynamic easing changes		
	function loadLamps(easing) {
		$('#lavaLampBasicImage').lavaLamp({
			fx: 'easeIn'+easing,
			speed: 800
		});

		$('#lavaLampVariableImage').lavaLamp({
			fx: 'easeOut'+easing,
			speed: 800,
			linum: 0
		});

	}
	
// jquery initialize:
	$(function() {
		loadLamps(easing);
		
		$('select#easing option[value='+easing+']').attr('selected','selected');
		$('.easingLabel').text(easing);
	});
	
// hover preview
$(document).ready(function(){

	$(".menu a").hover(function() {
		$(this).next("em").animate({opacity: "show", top: "-170"}, "slow");
	}, function() {
		$(this).next("em").animate({opacity: "hide", top: "-180"}, "fast");
	});


});
$(document).ready(function(){

	$(".login").click(function(){
		$(".login-div").slideToggle("slow");
		$(this).toggleClass("active"); return false;
	});
	
	 
});