$(document).ready(function(){

//contact block
$(".top-contact1").hover(
	function () {
		$(this).slideUp();
	}, null);

$(".top-contact2").hover(null, 
	function () {
		$(".top-contact1").slideDown();	
	});

//cases
rand = function(){
	var rnumb = "";
	var rand = "";
	rnumb += Math.floor(Math.random()*6);
	rand = rnumb;
	cases(rand);
	setTimeout('rand()',13000);
}

$("#case0,#case1,#case2,#case3,#case4,#case5").hide();

cases = function(rand){
	for(var y=0; y<6; y++) if(y!=rand) $("#case"+y).fadeOut(1000);
	$("#case"+rand).fadeIn(1000);
}

rand();

});