(function() { var _userName; document.write( "
" ); if( document.cookie.indexOf( "__venus_login_name__" ) > -1 ) { _userName = document.cookie.replace( /.*__venus_login_name__=([^\;]*).*/ , "$1" ); if( _userName ) { document.getElementById( "headerLogin" ).innerHTML = '
' + decodeURIComponent(_userName) + '
'; } } window.onload = function() { var index , _$navDown = $( ".header-navbar .navigation-down" ) , _$navDownLi = _$navDown.find( "li" ) , _$navLi = $( ".header-navbar .li-wh" ); _$navLi.on( "mouseenter" , function() { var _index = $( this ).data( "index" ); _$navDown.addClass( "on" ); _$navLi.removeClass( "on" ); $( this ).addClass( "on" ); _index >= 0 && _$navDownLi.eq( _index ).mouseenter(); } ); _$navDownLi.on( "mouseenter" , function() { var _index = $( this ).index(); if( _index >= 0 && _index < _$navLi.length ) { _$navDownLi.removeClass( "on" ); this.className += " on"; $( ".li-wh" ).removeClass( "on" ); _index >= 0 && _$navLi.eq( _index ).addClass( "on" ); } } ); _$navDown.on( "mouseleave" , function() { _$navDown.removeClass( "on" ); _$navLi.removeClass( "on" ); } ).on( "mouseenter" , function() { _$navDown.addClass( "on" ); } ); checkCurrentPageStatus(); }; function checkCurrentPageStatus() { var _hash = { "http://www.qxwz.com/index.html" : 0 }; $( ".header-navbar .is-nav a" ).each( function( i ) { if( /^http.*/.test( this.href ) ) { _hash[ this.href ] = i; } } ); $( ".header-navbar .navigation-down li" ).each( function( i ) { $( this ).find( "a" ).each( function() { _hash[ this.href ] = i + 1; } ); } ); _hash[ window.location.href ] != undefined && $( ".header-navbar .is-nav li" ).eq( _hash[ window.location.href ] ).addClass( "is-current" ); } return this; })();