var $activeSlide=$(".active"),$homeSlide=$(".slide"),$slideNavPrev=$("#prev"),$slideNavNext=$("#next");function init(){TweenMax.set($homeSlide.not($activeSlide),{autoAlpha:0}),TweenMax.set($slideNavPrev,{autoAlpha:.2})}function goToNextSlide(e,a,t){var o=new TimelineLite,i=e.find(".card__content"),n=a.find(".card__content"),s=e.find(".card__img"),d=a.find(".card__img"),l=a.index(),r=$homeSlide.length;0!==a.length&&o.set(a,{autoAlpha:1,className:"+=active"}).set(e,{className:"-=active"}).to(i,.65,{y:"+=40px",ease:Power3.easeInOut},0).to(s,.65,{backgroundPosition:"bottom",ease:Power3.easeInOut},0).to(t,1,{y:"-=100%",ease:Power3.easeInOut},0).fromTo(n,.65,{y:"-=40px"},{y:0,ease:Power3.easeInOut},"-=0.7").fromTo(d,.65,{backgroundPosition:"top"},{backgroundPosition:"bottom",ease:Power3.easeInOut},"-=0.7"),TweenMax.set($slideNavPrev,{autoAlpha:1}),l===r-1&&TweenMax.to($slideNavNext,.3,{autoAlpha:.2,ease:Linear.easeNone})}function goToPreviousSlide(e,a,t){var o=new TimelineLite,i=e.find(".card__content"),n=a.find(".card__content"),s=e.find(".card__img"),d=a.find(".card__img"),l=a.index();$homeSlide.length;0!==a.length&&o.set(a,{autoAlpha:1,className:"+=active"}).set(e,{className:"-=active"}).to(i,.65,{y:"-=40px",ease:Power3.easeInOut},0).to(s,.65,{backgroundPosition:"top",ease:Power3.easeInOut},0).to(t,1,{y:"+=100%",ease:Power3.easeInOut},0).fromTo(n,.65,{y:"+=40px"},{y:0,ease:Power3.easeInOut},"-=0.7").fromTo(d,.65,{backgroundPosition:"bottom"},{backgroundPosition:"top",ease:Power3.easeInOut},"-=0.7"),TweenMax.set($slideNavNext,{autoAlpha:1}),0===l&&TweenMax.to($slideNavPrev,.3,{autoAlpha:.2,ease:Linear.easeNone})}init(),$slideNavNext.click((function(e){e.preventDefault(),goToNextSlide($(".slide.active"),$(".slide.active").next(".slide"),$(".slide"))})),$slideNavPrev.click((function(e){e.preventDefault(),goToPreviousSlide($(".slide.active"),$(".slide.active").prev(".slide"),$(".slide"))}));