var slideAnim = {
nbSlide : 3,
nbCurrent : 1,
elemCurrent : null,
elem : null,
timer : null,
slideFrom: null,

 
 init : function(elem){
 this.timer = window.setInterval("slideAnim.next()", 5000);
},
    
    slide : function(slideto, slideFrom){
       $("#np_promo"+slideFrom).removeClass('active');
     $("#np_promo"+slideto).addClass('active');
    },
    
    next : function(){
    this.slideFrom = this.nbCurrent;
   this.nbCurrent++;
    if (this.nbCurrent > this.nbSlide ){
    this.nbCurrent = 1;
    }
    this.slide(this.nbCurrent, this.slideFrom);
    }    
}


$(document).ready(function(){

var slider = $('#spotlight').bxSlider({
auto: true,
autoHover: true,
controls: true,
pager: true,
speed: 1000,
pause: 15000,


    buildPager: function(slideIndex){
      switch (slideIndex){
        case 0:
          return '<a href="">NextPerformance</a>';
        case 1:
          return '<a href="">Retargeting</a>';
        case 2:
          return '<a href="">Local Retargeting</a>';
        case 3:
          return '<a href="">Real Time Targeting</a>';
        case 4:
          return '<a href="">Media Impact</a>';
                }
               }
});
 
 slideAnim.init();
 
$('.bx-next').hide();
$('.bx-prev').hide();

$('#carroussel_brand_list').webTicker();


$('.bx-wrapper').mouseover(function() {
  $('.bx-next').show();
  $('.bx-prev').show();
  });
$('.bx-wrapper').mouseout(function() {
  $('.bx-next').hide();
  $('.bx-prev').hide();
  });

});

