// javascript document $(document).ready(function(){ let time1 = () =>{$( ".header_rinav" ).stop( true, true).animate( { left: "0px" }, 800)} settimeout(time1,3000) let timer = () =>{$( ".header_rinav" ).stop( true, true).animate( { left: "-240px" }, 800)} settimeout(timer,6000) $( '.nav_ti>li>' ).click( function() { if( $( this ).find( 'ul' ).css( "display" ) == "none" ) { alert( 1 ) $( '.nav_ti>li' ).find( 'ul' ).stop( true ).slideup( 300 ); $( this ).find( 'ul' ).stop( true ).slidedown( 300 ); } else { $( '.nav_ti>li' ).find( 'ul' ).stop( true ).slideup( 300 ); $( this ).find( 'ul' ).stop( true ).slideup( 300 ); } } ) $( '.nav_ti>li>a' ).click( function() { $( this ).next( 'ul' ).stop( true ).slidetoggle(); $( this ).find( 'i' ).toggleclass( "scale1" ) } ) $( ".header_rinav" ).height( $( window ).height() ) $(window).on('load', function(){ $( ".header_show" ).width( $( window ).width() ) } ) $( window ).resize( function() { $( ".header_show" ).width( $( window ).width() ) } ) $( ".has_nav" ).hover( function() { $( '.has_nav' ).find( '.header_show' ).stop( true ).fadeout( 600 ); $( this ).find( ".header_show" ).stop( true ).fadein( 600 ); $( '.header_showbg' ).stop( true ).fadein( 600 ); }, function() { $( '.has_nav' ).find( '.header_show' ).stop( true ).fadeout( 600 ); $( '.header_showbg' ).stop( true ).fadeout( 600 ); } ) $( ".header_show_b li" ).hover( function() { var now = $( this ).index(); $( this ).parents( ".header_show" ).find( '.header_show_cimg' ).stop( true, true ).hide(); $( this ).parents( ".header_show" ).find( ".header_show_cimg" ).eq( now ).stop( true, true ).fadein( 600 ); $( this ).animate( { "opacity": "1" }, 100 ).siblings( "li" ).animate( { "opacity": "0.3" }, 100 ) } ) var hj = 0 $( ".header_rinav_nav li.hnv" ).hover( function() { var _this = $( this ) if( _this.find( ".header_rinav_c" ).hasclass( "on" ) ) { } else { if( hj == 1 ) { $( ".header_rinav_c" ).removeclass( "on" ).stop( true ).slideup( 500 ) _this.find( ".header_rinav_c" ).addclass( "on" ).stop( true ).slidedown( 500 ) $( ".header_rinav_c a" ).stop( true ).animate( { marginleft: "-10px", opacity: "0" }, 100 ); $( ".header_rinav_c .line" ).animate( { width: "0px" }, 300 ); _this.find( ".header_rinav_c .line" ).animate( { width: "50px" }, 200, function() { var sec2 = _this.find( ".header_rinav_c a" ).length; for( var j = 0; j < sec2; j++ ) { _this.find( ".header_rinav_c a" ).eq( j ).stop( true ).delay( j * 100 ).animate( { marginleft: "0", opacity: "1" }, 200 ); } } ); } } } ) $( ".header_rinav_b" ).click( function() { var nio = $( this ).attr( "data-id" ) $(".header_rinav").stop(true).animate( { left: "0px" }, 600, function(){ $( ".header_rinav_nav li" ).eq( nio ).find( ".header_rinav_c" ).stop( true ).slidedown( 500 ) $( ".header_rinav_nav li" ).eq( nio ).find( ".header_rinav_c .line" ).animate( { width: "50px" }, 200, function() { var sec2 = $( ".header_rinav_nav li" ).eq( nio ).find( ".header_rinav_c a" ).length; for( var j = 0; j < sec2; j++ ) { $( ".header_rinav_nav li" ).eq( nio ).find( ".header_rinav_c a" ).eq( j ).stop( true ).delay( j * 100 ).animate( { marginleft: "0", opacity: "1" }, 200 ); } hj = 1 } ) } ); } ) $(".header_rinav" ).hover(function(){ },function(){ $( ".header_rinav" ).stop( true, true ).animate( { left: "-240px" }, 600 ); $( ".header_rinav_nav li .header_rinav_c" ).stop( true ).slideup( 10 ) $( ".header_rinav_nav li .header_rinav_c .line" ).animate( { width: "0px" } ) $( ".header_rinav_nav li .header_rinav_c a" ).stop( true ).animate( { marginleft: "-10px", opacity: "0" }, 100 ); }) $( ".header_rinav_cl" ).click( function() { $( ".header_rinav" ).stop( true ).animate( { left: "-50%" }, 1000 ); $( ".header_rinav_nav li .header_rinav_c" ).stop( true ).slideup( 10 ) $( ".header_rinav_nav li .header_rinav_c .line" ).animate( { width: "0px" } ) $( ".header_rinav_nav li .header_rinav_c a" ).stop( true ).animate( { marginleft: "-10px", opacity: "0" }, 100 ); } ) $( document ).bind( "click", function( e ) { var target = $( e.target ); if( target.closest( ".header_rinav,.header_rinav_b" ).length == 0 ) { $( ".header_rinav" ).stop( true ).animate( { right: "-50%" }, 1000 ); $( ".header_rinav_nav li .header_rinav_c" ).stop( true ).slideup( 10 ) $( ".header_rinav_nav li .header_rinav_c .line" ).animate( { width: "0px" } ) $( ".header_rinav_nav li .header_rinav_c a" ).stop( true ).animate( { marginleft: "-10px", opacity: "0" }, 100 ); } ; e.stoppropagation(); } ) let playvideo = () =>{ let player = document.getelementbyid("video") player.play() } let pausevideo = () =>{ let player = document.getelementbyid("video") player.pause() } $('.video_bg span').click(()=>{ $('.video_bg').stop(true).fadeout(300) $('.index_video .close').stop(true).fadein(300) playvideo() }) $('.index_video .close').click(()=>{ $('.video_bg').stop(true).fadein(300) $('.index_video .close').stop(true).fadeout(300) pausevideo() }) })