function slideSwitch() {
  var $active = $( '.featuredProduct img.active' );

  if ( $active.length == 0 ) $active = $( '.featuredProduct img:first' );

  var $next = $active.next().length ? $active.next() : $( '.featuredProduct img:first' );

  $active.css( { opacity: 1 } )
    .removeClass( 'active' )
    .animate( { opacity: 0 }, 1000 );

  $next.css( { opacity: 0 } )
  .addClass( 'active' )
  .animate( { opacity: 1 }, 1000 );
}

$(document).ready( function() {
 if ( $( '.featuredProduct img').length > 1 ) {
  setInterval( "slideSwitch()", 2800 );
 }
});
