$(document).ready(function(){
  var quote_id = 1;
  var nextQuote = function () {
    
    // keep it in a loop
    if ( quote_id == 6 ) {
      quote_id = 1;
    } else {
      quote_id++;
    }
    
    // fade in/out
    $('.home_quote').fadeOut(600);
    $('#home_quote' + quote_id ).fadeIn(800);
  };
  
  // hide all quotes except first
  $('.home_quote:not(#home_quote1)').hide();

  // give quote container a static height to keep it from jumping around
  quote_box_height = $('.right_col').height();
  $('.right_col').css('height',quote_box_height);
  
  // set quotes' position to absolute, so the fading looks more seemless
  $('.home_quote').css('position','absolute');
    
  // start scrolling through quotes
  var auto_scroll = setInterval( nextQuote, 8000 );
});
