$(document).ready(function(){
	
	$(document).pngFix();
	
	
	// create slideshow
	$(".slides").show().each(function(){	
		var speed_rdm = Math.floor(Math.random()*401);
		var delay_rdm = Math.floor(Math.random()*3001);
		var timeout_rdm = Math.floor(Math.random()*4001);
		$(this).fadeIn(speed_rdm);
		$(this).delay( 2000+delay_rdm ).cycle({
			speed: speed_rdm+200,
			timeout:2000+timeout_rdm
		});
	});
	
	// create "hidebelow" paragraphs, and hide the paragraphs below them initially
	$("h3.hidebelow").append("<span>&nbsp;</span>");
	$("h3.hidebelow").each(function(){
		$(this).next("p").hide();
	});
	$("h3.hidebelow").toggle(function(){
		$(this).addClass("active");
		$(this).next("p").show("fast");
	},function(){
		$(this).removeClass("active");
		$(this).next("p").hide("fast");
	});
        $("h3.hidediv").append("<span>&nbsp;</span>");
        $("h3.hidediv").each(function(){
                $(this).next("div").hide();
        });
        $("h3.hidediv").toggle(function(){
                $(this).addClass("active");
                $(this).next("div").show("fast");
        },function(){
                $(this).removeClass("active");
                $(this).next("div").hide("fast");
        });

});



