$(document).ready(function() {
	
	/* PNG Fix */
	$(document).pngFix();
	
	/* Enter the Cufon */
	Cufon.replace("h3, h4, .wallpapers strong");

	/* Features */
	$("#features a.scroll").click(function(){
		$("#features ul").animate( { left: "-750px" } );
		$("#features a.back").fadeIn();
		$(this).fadeOut();
		return false;
	});
	$("#features a.back").click(function(){
		$("#features ul").animate( { left: "0px" } );
		$("#features a.scroll").fadeIn();
		$(this).fadeOut();
		return false;
	});
	
	/* Playlist */
	$("body.web #playlist ul li").hover(function(){
		$(this).children("span").stop(true, true);
		$(this).children("span").fadeIn();
	},
	function(){
		$(this).children("span").fadeOut();
	});
	$("body.web #playlist ul li").click(function(){
		$("ul li.active").removeClass("active");
		$(this).addClass("active");
		$("#spotlight ul li").animate( { opacity: 1.0 }, 200);
	});
	$("body.web #spotlight ul li").click(function(){
		$("ul li.active").removeClass("active");
		$(this).animate( { opacity: 1.0 }, 200);
		$("#spotlight ul li").not(this).animate( { opacity: 0.2 }, 200);
	});
	$("#playlist a.scroll").click(function(){
		$("#playlist ul").animate( { top: "-197px" } );
		$("#playlist a.back").fadeIn();
		$(this).fadeOut();
		return false;
	});
	$("#playlist a.back").click(function(){
		$("#playlist ul").animate( { top: "0px" } );
		$("#playlist a.scroll").fadeIn();
		$(this).fadeOut();
		return false;
	});
	
	/* Tweets */
	$("#twitter ul li").hover(function(){
		$(this).children(".tweet").stop(true, true);
		$(this).children(".tweet").animate( { marginTop: "-2px", opacity: "show" }, 200);
	},
	function(){
		$(this).children(".tweet").animate( { marginTop: "5px", opacity: "hide" }, 100);
	});
	
	/* Tweets */
	$("ul#awards li").hover(function(){
		$(this).children(".review").stop(true, true);
		$(this).children(".review").animate( { marginTop: "-2px", opacity: "show" }, 200);
	},
	function(){
		$(this).children(".review").animate( { marginTop: "5px", opacity: "hide" }, 100);
	});
	
	/* Hover Fades */
	$("#spotlight a, .screenshots a").hover(function(){
		$(this).children().stop(true, true);
    	$(this).children().animate( { top: "2px", opacity: 0.6 }, 200);
	},
	function(){
		$(this).children().animate( { top: "0px", opacity: 1.0 }, 200);
	});
	$("#appstore img").hover(function(){
		$(this).stop(true, true);
    	$(this).animate( { top: "2px", opacity: 0.8 }, 100);
	},
	function(){
		$(this).animate( { top: "0px", opacity: 1.0 }, 100);
	});
	$(".wallpapers li a").hover(function(){
		$(this).stop(true, true);
    	$(this).animate( { opacity: 0.9 }, 200);
	},
	function(){
		$(this).animate( { opacity: 1.0 }, 200);
	});
	
	/* Fancyzoom */
	$(".screenshots a, .wallpapers a").fancybox();
			
});