$(document).ready(function(){
	

	/*$('.nav_show1').css("margin-top",-(($('.nav_con').width()*0.65-40)/2*477/802+20));
	
	$('.nav_show2').css("margin-top",-(($('.nav_con').width()*0.7-80)/3*480/320)/2);
	
	$('.nav_show3').css("margin-top",-(($('.nav_con').width()*0.65-80)/3*480/320)/2);*/
	
	
	$('.nav_show_list1_img_b').height((($('.nav_con').width()*0.7-80)/3*480/320-40)/2);
	
	setTimeout(function(){
		$('.nav_con').stop(true).fadeOut(0);
		},1)
	
	$('.nav_li').hover(function(){

		$(this).find('.nav_con').stop(true,true).fadeIn(0);
		$(this).find('.nav_con').stop(true,true).animate({opacity:"1"},1000);
		$(this).find('.nav_three').stop(true,true).fadeIn(0);
		
		
		},function(){
			$(this).find('.nav_con').stop(true,true).fadeOut(0);
			$(this).find('.nav_con').stop(true,true).animate({opacity:"0"},1000);
			$(this).find('.nav_three').stop(true,true).fadeOut(0);
			})
	
	$('.nav_con>img').click(function(){
		$('.nav_con').stop(true,true).fadeOut(300);
	    $('.nav_con').stop(true,true).animate({opacity:"0"},300);
		
		$(".nav_bg").css({

			"background-color":"rgba(0,0,0,0)",
			" visibility": "hidden"
		})
		
		$('.nav_three').stop(true).fadeOut(300);
		
		})
			
	
	$(".changeco" ).click(function(){
		if($(".header_search" ).css("display")=="none"){
			$(".header_search" ).fadeIn(500)
			$(".header_search_bg" ).show()
		}
		else {
			$(".header_search_bg" ).hide()
			$(".header_search" ).fadeOut(500)
		}


	})

	/*
	$(".header_search_bg" ).hover(function(){
		$(".header_search_bg" ).hide()
		$(".header_search" ).fadeOut(500)
	})
	*/
	

	$(".header_sr_le input" ).focus(function(){

		$(".header_sr_le img" ).animate({"opacity":"0"},500)
	})
	//$(".slide_bar li" ).hover(function(){
	//	$(this ).find("div" ).stop(true).fadeIn(500)
	//},function(){
	//	$(".slide_bar li div" ).stop(true).fadeOut(500)
	//})
	//
	//$(".topc" ).click(function(){
	//	$( "html,body" ).animate( { scrollTop: "0" }, 1000 );
	//})

	setTimeout(function(){
		$(".slide_bar ul li" ).addClass("on")

	},2000)
	setInterval(function(){
		$(".slide_bar ul li" ).removeClass("on")
		setTimeout(function(){
			$(".slide_bar ul li" ).addClass("on")

		},2000)
	},4000)

	$( '.head_btn,.head_zi .tit' ).click( function()
	{
		if( $( this ).hasClass( 'head_btn_active' ) )
		{
			$( '.head_btn' ).removeClass( 'head_btn_active' );
			$( '.head_zi .tit' ).removeClass( 'head_btn_active' );
			$( '.show_nav' ).removeClass( 'show_nav_on' );

			$( 'body' ).removeClass( 'body_on' );

		}
		else
		{
			$( '.head_btn' ).addClass( 'head_btn_active' );
			$( '.head_zi .tit' ).addClass( 'head_btn_active' );

			$( '.show_nav' ).addClass( 'show_nav_on' );

			$( 'body' ).addClass( 'body_on' );

		}
	} )
	
	
	$('.banner_video').height($(window).width()*700/1920);
	
	
	$('.nav_li').hover(function(){
		$('.nav_bg').stop(true).fadeIn(600);
	//	$(".header_search_bg" ).hide()
	//	$(".header_search" ).fadeOut(500)
		},function(){
			$('.nav_bg').stop(true).fadeOut(600);
			})
			
			
	
			
	
	
	var abbanPlay = document.getElementById("abPlay_html5_api");
		
        function abplay1() {
			abbanPlay.play();
            }
        
		function abplay2() {
			abbanPlay.pause();
            }	
	   
	   
$('.banner_video_zi h5').click(function(){
	abplay1();
	$('.wan_video').stop(true).fadeIn(600);
	$('.banner_video_close').stop(true).fadeIn(600);
	})	   

$('.video_close').click(function(){
	abplay2();
	$('.wan_video').stop(true).fadeOut(600);
	$('.banner_video_close').stop(true).fadeOut(600);
	})

$(".news11_play").click(function(){
	abplay1();
	$(".wan_video").stop(true).fadeIn(600);
	})


$(".about_banner_text").click(function(){
	abplay1();
	$(".wan_video").stop(true).fadeIn(600);
	})	

$('.banner_video_close').click(function(){
	abplay2();
	$('.wan_video').stop(true).fadeOut(600);
	$('.banner_video_close').stop(true).fadeOut(600);
	})		    
			
	
})

$( document ).ready( function()
{
	$(".nav_li").hover(function(){
		if($(this).find(".nav_con").css('display')=='block')
		{
			$(".nav_bg").css({
				"background-color":"rgba(0,0,0,0.6)",
				" visibility": "visible"
			})
		}

	},function(){
		$(".nav_bg").css({

			"background-color":"rgba(0,0,0,0)",
			" visibility": "hidden"
		})
	})

	if($(window).width()>768){
		var hh = $( ".banner" ).width() * 700 / 1920;
		$( '.wap_con' ).css( "margin-top", hh );
	}
	else{
		$( '.wap_con' ).css( "margin-top",0);
	}
	$( '.watch' ).height( $( window ).height() * 0.6 )


	$('.nav_left1 li').hover(function(){
		var s7=$(this).index();
		$('.nav_left1 li').find("a").removeClass('nav_color');
		$(this).find("a").addClass('nav_color');
		$('.nav_right1').stop(true).fadeOut(0);
		$('.nav_right1').eq(s7).stop(true).fadeIn(300);

	})

	$('.nav_left2 li').hover(function(){
		var s7=$(this).index();
		$('.nav_left2 li').find("a").removeClass('nav_color');
		$(this).find("a").addClass('nav_color');
		$('.nav_rigth2').stop(true).fadeOut(0);
		$('.nav_rigth2').eq(s7).stop(true).fadeIn(300);

	})
	$('.nav_left3 li').hover(function(){
		var s7=$(this).index();
		$('.nav_left3 li').find("a").removeClass('nav_color');
		$(this).find("a").addClass('nav_color');
		$('.nav_rigth3').stop(true).fadeOut(0);
		$('.nav_rigth3').eq(s7).stop(true).fadeIn(300);

	})
	$('.nav_left4 li').hover(function(){
		var s7=$(this).index();
		$('.nav_left4 li').find("a").removeClass('nav_color');
		$(this).find("a").addClass('nav_color');
		$('.nav_rigth4').stop(true).fadeOut(0);
		$('.nav_rigth4').eq(s7).stop(true).fadeIn(300);

	})
	$('.nav_left5 li').hover(function(){
		var s7=$(this).index();
		$('.nav_left5 li').find("a").removeClass('nav_color');
		$(this).find("a").addClass('nav_color');
		$('.nav_rigth5').stop(true).fadeOut(0);
		$('.nav_rigth5').eq(s7).stop(true).fadeIn(300);

	})
	$('.nav_left6 li').hover(function(){
		var s7=$(this).index();
		$('.nav_left6 li').find("a").removeClass('nav_color');
		$(this).find("a").addClass('nav_color');
		$('.nav_rigth6').stop(true).fadeOut(0);
		$('.nav_rigth6').eq(s7).stop(true).fadeIn(300);

	})

	// $('.nav_sousuo2').click(function()
	// {
	// 		$(".nav_con_la").slideDown( 1000);
	// 		$('.nav_bg').stop(true).fadeIn(600);
	// 		$(".header_search_bg" ).hide()
	// 		$(".header_search" ).fadeOut(500)



	// 	$(".nav_bg").click(function(){
	// 		$(".nav_con_la").slideUp( 500);
	// 		$('.nav_bg').stop(true).fadeOut(600);

	// 	})
	// })

	$('.nav_sousuo2').hover(function()
	{
			$(".nav_con_la").slideDown( 600);
				$('.nav_bg').stop(true).fadeIn(600);
				$(".nav_bg").css({

					"background-color":"rgba(0,0,0,0.6)",
					" visibility": "visible"
				})
			
	},function(){
			$(".nav_con_la").stop(true).slideUp( 500);
			$('.nav_bg').stop(true).fadeOut(600);
			$(".nav_bg").css({

			"background-color":"rgba(0,0,0,0)",
			" visibility": "hidden"
			});

	})


	/************phone nav**********/

$(document).ready(function(){
 /*$("#jPanelMenu-menu>ul>li").click(function(){
		if($(this).find("ul").css("display")=="none"){			
			$(this).find("ul").slideDown();	
		}else{
			$(this).find("ul").slideUp();
		}
		
	});*/

$('.xpnav-btn').click(function(){
	
	if($('.phone_nav_box').css('left')=="-200px"){
		
		
		$('.phone_nav_box').stop(true).animate({left:"0"},"slow")
	   $('.xpnav').stop(true).animate({left:"200px"},"slow")	
	    $('body').stop(true).animate({left:"200px"},"slow")
		}else{
			
			
			$('.phone_nav_box').stop(true).animate({left:"-200px"},"slow")
	$('.xpnav').stop(true).animate({left:"0"},"slow")	
	$('body').stop(true).animate({left:"0"},"slow")
			
			}
	
	})	
	

	
$('.nav_ti>li>a').click(function(){
	if($(this).next('ul').css("display")=="none"){
		$('.nav_ti>li>a').next('ul').stop(true).slideUp(300);
		$(this).next('ul').stop(true).slideDown(300);
        $('.nav_ti>li>a').find('i').removeClass("scale1");
	    $(this).find('i').addClass("scale1");				
	}else{
        $('.nav_ti>li>a').next('ul').stop(true).slideUp(300);
        $('.nav_ti>li>a').find('i').removeClass("scale1");
	}
	})

	$(".sec_nav").click(function(){

		$(this).next('ul').stop(true).slideToggle();
	 	$(this).find('i').toggleClass("scale1")
	})	
	
})

})

