$(function(){ $("ul.menu-nav>li").hover(function() { console.log($(this).find('.subitem')); $(this).find('.subitem').show(); }, function() { $(this).find('.subitem').hide(); }); if($(".complist").length){ var complist_top = $(".complist").offset().top; var pro_top = $(".probox").offset().top; var business_top = $(".businessbox").offset().top; var shiti_top = $(".shitibox").offset().top; $(window).scroll(function(){ var curtop=$(window).scrollTop()+$(window).height()*0.6; if(curtop>complist_top - 500) { $(".complist>div").each(function(index, el) { if(index<3){ $(this).addClass('animated fadeInLeftBig'); }else{ $(this).addClass('animated fadeInRightBig'); } }); } if(curtop>pro_top - 200) { $(".probox>div").each(function(index, el) { if(index==0 || index==3){ $(this).addClass('animated slideInLeft'); }else{ $(this).addClass('animated slideInRight'); } }); } if(curtop>business_top - 200) { $(".businessline").addClass('animated pulse'); $(".businessitem").each(function(index, el) { if(index==0 || index==2 || index==4 || index==6){ $(this).addClass('animated fadeInDownBig'); }else{ $(this).addClass('animated fadeInUpBig'); } }); } if(curtop>shiti_top - 200) { $(".shitibox>div").each(function(index, el) { if(index==0 || index==2){ $(this).addClass('animated flipInX'); }else{ $(this).addClass('animated flipInY'); } }); } }) } // // $(".shitibox .column").hover(function() { $(this).find('.shitiitem').animate({top:0}); }, function() { $(this).find('.shitiitem').animate({top:'570px'}); }); })