
var is_something_open = false;
var timer = 10;
function hideAll() {
	$('#sub_intro').hide();
	$('#sub_products').hide();
	$('#sub_biz').hide();
	$('#sub_others').hide();
	is_something_open = false;	
//	setTimeout('close_all()',timer);	
}
function close_all()
{
	is_something_open = false;
}
function show_which1() {
	if(!is_something_open)	
		$('#sub_intro').show();
	is_something_open = true;
}
function show_which2() {
	if(!is_something_open)	
		$('#sub_products').show();
	is_something_open = true;
}
function show_which3() {
	if(!is_something_open)	
		$('#sub_biz').show();
	is_something_open = true;
}
function show_which4() {
	if(!is_something_open)	
		$('#sub_others').show();
	is_something_open = true;
}

$(document).ready(function() {	
	$('#intro').mouseover(
		function() {
			$('#intro').css("background-image","url(/export/hyundaiups/resources/blink.gif)");
			$('#products').css("background-image","none");
			$('#biz').css("background-image","none");
			$('#others').css("background-image","none");
			hideAll();
			setTimeout('show_which1()',timer);
		}
	);
	$('#products').mouseover(
		function() {
			$('#intro').css("background-image","none");
			$('#products').css("background-image","url(/export/hyundaiups/resources/blink.gif)");
			$('#biz').css("background-image","none");
			$('#others').css("background-image","none");
			hideAll();
			setTimeout('show_which2()',timer);
		}
	);
	$('#biz').mouseover(
		function() {
			$('#intro').css("background-image","none");
			$('#products').css("background-image","none");
			$('#biz').css("background-image","url(/export/hyundaiups/resources/blink.gif)");
			$('#others').css("background-image","none");
			hideAll();
			setTimeout('show_which3()',timer);
		}
	);
	$('#others').mouseover(
		function() {
			$('#intro').css("background-image","none");
			$('#products').css("background-image","none");
			$('#biz').css("background-image","none");
			$('#others').css("background-image","url(/export/hyundaiups/resources/blink.gif)");
			hideAll();
			setTimeout('show_which4()',timer);
		}
	);
});
