$(document).ready(function(){	
//smooth scroll    
$('#main-nav .menu a').smoothScroll({speed:1200,excludeWithin:['.our_blog','.our_twitter','.our_facebook']});

//bxSlider    
  // assign the slider to a variable
  var slider = $('#offers-slider').bxSlider({
    controls: false
  });

//colorbox    
// Colorbox mus be called after bxSlider, otherwise bx screws with it
//https://github.com/jackmoore/colorbox/issues/135
$(".sucursales_colorbox").colorbox({rel:'sucursales_colorbox'});
$(".ofertas_colorbox").colorbox({rel:'ofertas_colorbox'});
$(".maps-colorbox").colorbox({iframe:true, width:"80%", height:"600"});


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

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

// audio player
$(".audio").mb_miniPlayer({
        width:210,
        inLine:false
      });

// blinking class
$('.blink').blink(300,1000);

$('.play').click(function(e){
    _gaq.push(['_trackEvent', 'Audio', 'Play', 'Yokomo Sushi Dirty Merengue']);
})

});

