const SetupHome = () => { if ($(body).hasClass('setup-library') && $(body).hasClass('layout-single')) { let tl = gsap.timeline({repeat:-1,yoyo:true,defaults:{ease:"sine.inOut"}}); tl.fromTo(Site.home.book.area,{y:-5},{duration:1,y:5}); $(Site.home.wrap).slick(Site.home.slick); $(Site.home.book.wrap).hover( function() { gsap.to(this,{duration:0.1,y:-20}); }, function() { gsap.to(this,{duration:0.1,y:0}); }); } } if (Site.home.active) { $(SetupHome); }