/*document.write('<link href="/share/common/styles/for_ie6.css" rel="stylesheet" type="text/css" media="all" />');
*/
var istRollOver = {
	preloadedImages:new Array(),
	preloadImage:function(uri){
		var plength = istRollOver.preloadedImages.length
		istRollOver.preloadedImages[plength] = new Image();
		istRollOver.preloadedImages[plength].src = uri;
	}
}

$(function(){
var crFlg = 'false';
$('#TopGlvNav ul li ul').hide();
//ホバー時の処理


$('#TopGlvNav ul li').hover(function(){
if( jQuery.browser.msie && (jQuery.browser.version < 7)) {
if( jQuery.browser.msie && (jQuery.browser.version < 7) && crFlg == 'false') {
$(this).children('a').html($(this).children('a').html().replace('_off','_on'));
crFlg = 'true';
}}



},function(){
if( jQuery.browser.msie && (jQuery.browser.version < 7) && crFlg == 'true') {
$(this).children('a').html($(this).children('a').html().replace('_on','_off'));
$(this).children('ul').hide();
crFlg = 'false';
}});


$('#TopGlvNav ul li:has(ul)').hover(function(){
	
$(this).children("ul").fadeIn("fast");
//alert('hoge');
if( jQuery.browser.msie && (jQuery.browser.version < 7) ){
if( jQuery.browser.msie && (jQuery.browser.version < 7) && crFlg == 'false') {
$(this).children('a').html($(this).children('a').html().replace('_off','_on'));
crFlg = 'true';


}}
$(this).css('opacity','0.9');

},function(){
$(this).children("ul").hide();
if( jQuery.browser.msie && (jQuery.browser.version < 7) ) {
if( jQuery.browser.msie && (jQuery.browser.version < 7) && crFlg == 'true') {
$(this).children('a').html($(this).children('a').html().replace('_on','_off'));
$(this).children('ul li').hide();
crFlg = 'false';


}}


});


$('#TopGlvNav ul li ul').hover(function(){
	
if( jQuery.browser.msie && (jQuery.browser.version < 7)) {
if( jQuery.browser.msie && (jQuery.browser.version < 7) && crFlg == 'true') {
$(this).parent().children('a').html($(this).parent().children('a').html().replace('_off','_on'));

	crFlg = 'true';
	}}else{
	var imagin = $(this).parent().children().children();
	imagin.attr("src",imagin.attr("src").replace('_off','_on'));
	var num= $(this).parent().attr('id');
	
	var btnChange = '#' + num ;
	$(btnChange).css('opacity','0.93');
}},
function(){

if( jQuery.browser.msie && (jQuery.browser.version < 7) ) {
if( jQuery.browser.msie && (jQuery.browser.version < 7) && crFlg == 'false') {
$(this).parent().children('a').html($(this).parent().children('a').html().replace('_on','_off'));
$(this).parent().children('li').hide();
	crFlg = 'false';
}}else{
	//var imagin = $(this).parent().children();
	//imagin.attr("src",imagin.attr("src").replace('_on','_off'));
	var num= $(this).parent().attr('id').replace('parent','');
	
	var btnChange = "#alpha"+ num;
	var reOpacity = "#parent"+ num;
	$(btnChange).attr("src",$(btnChange).attr("src").replace('_on','_off'));
	$(reOpacity).css('opacity','0.93');
	//$(this).parent().hide();
}		

var postfix = '_on.';
	$('#TopGlvNav a img').each(function() {
	var img = $(this);

	var i_class = $(this).attr('class');
	var b_id = $("body").attr('id');
	
	if(i_class!="" && b_id==i_class){
	var src = img.attr('src');
	var src_on = src.replace('_off.', postfix);
	//$(this).attr('src', src_on);
	
	
	return;
	}else{
	return;
	}
	});
	});
});
