$j(document).ready(function() {

	//Set it so content1 shows on load
	$j("#content1").hide();
	$j("#content2").hide();
	$j("#content3").hide();
	$j("#content4").hide();
	
	//function to show a specified content and
	//hide the others
	function show_content (content) {
		for(i=1;i<5;i++) {
			if(i == content) {
				$j("#content"+i).show('normal');
				$j("#content"+i).slideDown('normal');
				$j("#show_content"+i).addClass('on');
			}
			else {
				$j("#content"+i).hide('normal');
				$j("#show_content"+i).removeClass('on');
			}
			$j("#default").hide();
		}
	}
	
	function close_content (content) {
		$j("#content"+content).hide('normal');
		$j("#content"+content).slideUp('normal');
		$j("#show_content"+content).removeClass('on');
		$j("#default").show('normal');
		$j("#default").slideDown('normal');
	}
	
	//On clicks for showing contents
	$j("#show_content1").hover(function(){
		show_content(1);
	});

	$j("#show_content2").hover(function(){
		show_content(2);
	});
	
	$j("#show_content3").hover(function(){
		show_content(3);
	});	
	
	$j("#show_content4").hover(function(){
		show_content(4);
	});
	
	//On clicks for closing contents
	$j("#close_content1").click(function(){
		close_content(1);
	});

	$j("#close_content2").click(function(){
		close_content(2);
	});
	
	$j("#close_content3").click(function(){
		close_content(3);
	});	
	
	$j("#close_content4").click(function(){
		close_content(4);
	});
	
});

