
(function($){

  $(function(){
    
      var dom = $("#splash-feature");
      
      dom.meltSlider({
        speed: 500,
        btnKey: "index",
        activeClassTakerKey: "class-taker",
        slideSelector: ".interactive",
        index: 0,
      //  autoRotate: true,
       // dur: 500,
       // rotateCounts: 1,
        direction: "h"
      });
      
      
      
      //moving arrow

      var isPatient = $(document.body).hasClass("active-patient"),
          arrow = $("#splash-header .active-arrow"),
          arrowPositions = isPatient? [214,333,440,551,656,765,872] : [226,361,485,611,737,862];
    
      arrow.css({
        left: arrowPositions[0]
      });
      
      dom.bind("MeltSlider:animationStart",function(ev,index){
        index = index? index: 0;
        arrow.animate({
          left: arrowPositions[index]
        })

      });

  })

})(jQuery);
