// JavaScript Document
$(function(){
  // assign the slider to a variable
  var slider = $('#slider1').bxSlider({
    auto: true,
	pager: true,
	pause: 7000,
	pagerActiveClass: 'sliderOver', 
    controls: false,
	buildPager: function(slideIndex){
      switch (slideIndex){
        case 0:
          return '<a href=""></a>';
        case 1:
          return '<a href=""></a>';
        case 2:
          return '<a href=""></a>';
        case 3:
          return '<a href=""></a>';
        case 4:
          return '<a href=""></a>';
        case 5:
          return '<a href=""></a>';
        case 6:
          return '<a href=""></a>';
      }
    }
	
  });

  // assign a click event to the external thumbnails
  $('.slideLinkHolder a').click(function(){
   var thumbIndex = $('.slideLinkHolder a').index(this);
    // call the "goToSlide" public function
    slider.goToSlide(thumbIndex);
  
    // remove all active classes
    $('.slideLinkHolder a').removeClass('sliderOver');
    // assisgn "pager-active" to clicked thumb
    $(this).addClass('sliderOver');
    // very important! you must kill the links default behavior
    return false;
  });

  // assign "pager-active" class to the first thumb
  $('.slideLinkHolder a:first').addClass('sliderOver');
});
