////////////////////////////////////////////////
//
// util.js[ver1.1 080618]
//
////////////////////////////////////////////////

function tabChange (tcname){
	$('#content #tabNav li').each(function(){
		var tcname2 = $(this).attr('class');
		var tpict = $(this).find("img").attr('src');
		if(tcname == tcname2){
			tpict = tpict.replace('of', 'on');
		}else{
			tpict = tpict.replace('on', 'of');
		}
		
		$(this).find("img").attr('src', tpict);
	});


	$('#content .tabCont .sectionH4').each(function(){
		var tiname = $(this).attr('id');
		if(tcname == tiname){
			$(this).css('display', 'block');
		}else{
			$(this).css('display', 'none');
		}
	});
}

$(function(){

$("#main h4").wrapInner('<span></span>');

$('a.newwin').click(function(){
window.open(this.href, '_blank');
return false;
});

$(function(){  
$('#headerFix').exFixed(); // for IE6  
});

$('#header #gNav li.sub01, #header #gNav li.sub02, #header #gNav li.sub03').hover(function(){
	var pict = $(this).find("img").attr('src');
	var cname = $(this).attr('class');
	pict = pict.replace('of', 'on');
	$(this).find("img").attr('src', pict);

	$('#header ul#sub01,#header ul#sub02,#header ul#sub03').each(function(){
		var iname = $(this).attr('id');
		if(cname == iname){
			$(this).css('display', 'block');
		}else{
			$(this).css('display', 'none');
		}
	});
	return false;
},function(){
	var pict = $(this).find("img").attr('src');
	pict = pict.replace('on','of');
	$(this).find("img").attr('src', pict);

	$('#header ul#sub01,#header ul#sub02,#header ul#sub03').each(function(){
		$(this).css('display', 'none');
	});
	return false;
});

$('#header ul#sub01,#header ul#sub02,#header ul#sub03').hover(function(){
	$(this).css('display', 'block');
},function(){
	$(this).css('display', 'none');
});

$('#content #tabNav li').click(function(){
	var tcname = $(this).attr('class');
	tabChange(tcname);
	return false;
});

});

function auroratab(){
	$('#content .tabCont2 #tab202').css('display', 'none');
	$('#content #tabNav2 li').click(function(){
		var tcname = $(this).attr('class');
		$('#content #tabNav2 li').each(function(){
			var tcname2 = $(this).attr('class');
			var tpict = $(this).find("img").attr('src');
			if(tcname == tcname2){
				tpict = tpict.replace('of', 'on');
			}else{
				tpict = tpict.replace('on', 'of');
			}
			
			$(this).find("img").attr('src', tpict);
		});


		$('#content .tabCont2 .sectionH4').each(function(){
			var tiname = $(this).attr('id');
			if(tcname == tiname){
				$(this).css('display', 'block');
			}else{
				$(this).css('display', 'none');
			}
		});
		return false;
	});
}

