text: var timer,oldindex,newindex,item_in=$('.in')[0],item_out=$('.out')[0],nav_links=Array.prototype.slice.call($('.nav_link')),paths=nav_links.map(function(a){return $(a).data('bgimage')});let count=$('.nav_link').length,index=0;$(item_in).css({'background-image':'url('+paths[index]+')'}),$('.nav_link span').bind('mouseenter',function(a){a.stopPropagation()}),$(nav_links).bind('mouseenter',function(a){clearInterval(timer),oldindex=newindex?newindex:index,newindex=$.inArray(a.target,nav_links),index=newindex,$('.slider_item').toggleClass('in out'),$('.out').css({'background-image':'url('+paths[oldindex]+')'}),$('.in').css({'background-image':'url('+paths[newindex]+')'})});const tik_tok=function(){clearInterval(timer),timer=setInterval(function(){$('.slider_item').toggleClass('in out'),$('.out').css({'background-image':'url('+paths[index]+')'}),++index==count&&(index=0),newindex=index,$('.in').css({'background-image':'url('+paths[index]+')'})},3e3)};$(nav_links).bind('mouseout',tik_tok),tik_tok();