// JavaScript Document
<!--
$(document).ready(function() {
	/*if($.browser.msie && $.browser.version <= 7){
		$('.btn_bg').css({'display':'none'});
	}
	else{
		$('.btn_bg').animate({opacity:'0'}, 0);
	}*/
	$('.btn_bg').animate({opacity:0}, 0).css({'display':'none'});
	//$('.root_item').children('.btn_bg').animate({opacity:0}, 0);
	//$('.root_item').children('.btn_bg').css({'display':'none'});
	
	$('.body .index_menu .float_line').css({"display":"none"});
	$('.body .index_menu .float_line').animate({opacity:0}, 0);
	$('.body .index_menu .root_item .sub_list').animate({opacity:0}, 0);
	
	if($.browser.msie){
		$('.body .index_menu .float_line img').attr("src","img/menu_btn_line.jpg");
	}
	
	$('.body .index_menu .root_item').hover(function(){
		$('.body .index_menu .float_line').animate({opacity:0.4}, 0);
		
		$(this).children('.btn_link').css({"color":"#000000"});
		$(this).children('.btn_bg').stop().css({'display':'block'}).animate({opacity:0.6}, 200);
		
		
		var float_top = 0;
		$('.body .index_menu .float_line').css({"display":"block"});
		float_top = $(this).position().top + 20;
		
		$('.body .index_menu .float_line').stop().animate({opacity:1, "top":float_top}, 200);
		
		$(this).children('.sub_list').css({"display":"block"});
		$(this).children('.sub_list').stop().animate({opacity:1, "left":"170px"}, 300);
		/*if($.browser.msie){
			$(this).css({"background-color":"#FFFFFF"});
		}
		else{
			$(this).css({"background-color":"#660000"});
			$(this).stop().animate({backgroundColor: '#FFFFFF'}, 300);
		}*/
	}, function(){
		$(this).children('.btn_link').css({"color":"#FFFFFF"});
		$(this).children('.btn_bg').animate({opacity:0}, 200, function(){$(this).css({'display':'none'});});
		
		$(this).children('.sub_list').stop().animate({opacity:0, "left":"300px"}, 300, function(e){$(this).css({"display":"none"});});
		/*$(this).stop().css({"background":"none"});
		if($(this).children('a').children('span').css('color') == 'rgb(94, 58, 0)'){
			$(this).children('a').children('span').css({'color':'#ffc600'})
		}
		else{
			$(this).children('a').css({"color":"#FFFFFF"});
		}*/
	}).click(function(){
		location.href = $($(this).children('a')).attr('href');
	});
	
	
	$('.body .index_menu .sub_item').hover(function(){
		$(this).children('.btn_link').css({"color":"#000000"});
		if($.browser.msie && $.browser.version <= 7){
			$(this).children('.btn_bg').css({'display':'block'});
		}
		else{
			$(this).children('.btn_bg').stop().css({'display':'block'}).animate({opacity:0.6}, 200);
		}
		//$(this).children('.btn_bg').stop().animate({opacity:0.6}, 200);
	}, function(){
		$(this).children('.btn_link').css({"color":"#FFFFFF"});
		if($.browser.msie && $.browser.version <= 7){
			$(this).children('.btn_bg').css({'display':'none'});
		}
		else{
			$(this).children('.btn_bg').animate({opacity:0}, 200, function(){$(this).css({'display':'none'});});
		}
		//$(this).children('.btn_bg').animate({opacity:0}, 200);
	}).click(function(){
		location.href = $($(this).children('a')).attr('href');
	});
})
$(window).load(function(){
	
});
