$(document).ready(function() {

	$("#banner").css({height: "23px"});
	$("#banner").hoverIntent(function(){
		$(this).stop().animate({height: "111px"}, "normal");
	}, function(){
		$(this).stop().animate({height: "23px"}, "normal");
	});
	
	
	var recover = false;
	$.localScroll();
		
	$("#recoverDetails").attr("href", "#").click(function() {
		$("#recovery").slideDown("fast");
		$("#wrapper").fadeTo("fast", 0.2);
		recover = true;
	});
	$("#recoverDetailsHide").click(function() {
		$("#recovery").slideUp("fast");
		$("#wrapper").fadeTo("fast", 1);
		$("#userlogin").fadeTo(0, 0.2)	
		recover = false;
	});
	
	$(".redFlash").animate({opacity: "1"}, "normal")
		.animate({backgroundColor: "#bf0000"}, "fast")
		.animate({backgroundColor: "#000"}, 1000);
		
	$(".slowFade").animate({opacity: "0.5"}, "fast")
					.animate({opacity: "1"}, "fast")
					.animate({opacity: "0.5"}, "fast")
					.animate({opacity: "1"}, "fast")
					.animate({opacity: "0.5"}, "fast")
					.animate({opacity: "1"}, "fast")
					.animate({opacity: "0.5"}, "fast")
					.animate({opacity: "1"}, "fast")
					.animate({opacity: "0.5"}, "fast")
					.animate({opacity: "1"}, "fast")
					.animate({opacity: "1"}, 5000)
					.animate({opacity: "0"}, 2000);
	
	$("#userlogin").fadeTo(0, 0.2)	
		.hoverIntent(function() {
			if(recover!=true){
				$(this).stop(true,true).fadeTo("fast", 0.9);
				$("#wrapper").stop().fadeTo("fast", 0.2);
				};
		}, function() {
			if(recover!=true){
			$(this).stop(true,true).fadeTo("fast", 0.2);
			$("#wrapper").stop().fadeTo("fast", 1);
			};
		});

	$("#jitsublurb").hide();
	$("#showjitsublurb").click(function() {
		newcursor = "";
		showhide = $(this).find("span").html();
		if(showhide=="more"){
			showhide="less";
			newcursor = "n-resize";
		} else {
			showhide="more";
			newcursor = "s-resize";
		};
		$("#showjitsublurb").find("span").html(showhide);
		$("#showjitsublurb").css({cursor: newcursor});
		$("#jitsublurb").toggle("normal");
	});
	
// PHP image slideshow
	$('#slideshow').cycle({ 
    fx:    'scrollLeft', 
    speed:  800,
    timeout: 4000,
    pause: true
 	});
});
