$(document).ready(function() {

	// Fancybox
	$("a#single_image").fancybox({
		'hideOnContentClick': true,
		'fade':'fade',
		'titleShow':false
	});
	
	// Support
	$("#supportApps li a").click(function() {	
		$(".supportData").slideUp("fast");
		$(this.hash + ".supportData ").slideDown("slow");
	});
	
	// iCascade switch
	hideAll();
	$("#movie").show();
	
	$("#thumb1").click(function() {
		hideAll();
		$("#movie").show();
	});
	
	$("#thumb2").click(function() {
		hideAll();
		$("#image2").fadeIn(200);
	});
	
	$("#thumb3").click(function() {
		hideAll();
		$("#image3").fadeIn(200);
	});
	
	$("#thumb4").click(function() {
		hideAll();
		$("#image4").fadeIn(200);
	});
	
	function hideAll() {
		
		$("#movie").hide();
		$("#image2").hide();
		$("#image3").hide();
		$("#image4").hide();
	}
	
	$('#download-justnotes').click(function() {
		pageTracker._trackPageview('/justnotes/download.html');
	});
});
