
  var firstPhotoShufflerDivId = "firstJump";
  var firstPhotoShufflerImgId = "first"; 
  var firstImg = new Array(
	"http://www.skydivehouston.com/images/shuffle/tandem11.jpg?v=0",
	"http://www.skydivehouston.com/images/shuffle/tandem10.jpg?v=0",
	"http://www.skydivehouston.com/images/shuffle/tandem9.jpg?v=0",
	"http://www.skydivehouston.com/images/shuffle/tandem8.jpg?v=0",
	"http://www.skydivehouston.com/images/shuffle/tandem7.jpg?v=0",
	"http://www.skydivehouston.com/images/shuffle/tandem6.jpg?v=0",
	"http://www.skydivehouston.com/images/shuffle/tandem5.jpg?v=0",
	"http://www.skydivehouston.com/images/shuffle/tandem4.jpg?v=0",
	"http://www.skydivehouston.com/images/shuffle/tandem3.jpg?v=0",
	"http://www.skydivehouston.com/images/shuffle/tandem2.jpg?v=0",
	"http://www.skydivehouston.com/images/shuffle/tandem1.jpg?v=0"
    );
  var firstPauseSeconds = 5;
  var firstFadeSeconds = .85;
  var firstRotations = 99;

  // End Customization section
  
  var firstDeckSize = firstImg.length;
  var firstOpacity = 100;
  var firstOnDeck = 0;
  var firstStartImg;
  var firstImageRotations = firstDeckSize * (firstRotations+1);

  window.onload = firstShufflerLaunch;
  
  function firstShufflerLaunch()
  {
  	var theimgFirst = document.getElementById(firstPhotoShufflerImgId);
        firstStartImg = theimgFirst.src; // save away to show as final image

	document.getElementById(firstPhotoShufflerDivId).style.backgroundImage='url(' + firstImg[firstOnDeck] + ')';
	setTimeout("firstShufflerFade()",firstPauseSeconds*1000);
  }

  function firstShufflerFade()
  {
  	var theimgFirst = document.getElementById(firstPhotoShufflerImgId);
	
  	// determine delta based on number of fade seconds
	// the slower the fade the more increments needed
        var fadeDelta = 100 / (30 * firstFadeSeconds);

	// fade top out to reveal bottom image
	if (firstOpacity < 2*fadeDelta ) 
	{
	  firstOpacity = 100;
	  // stop the rotation if we're done
	  if (firstImageRotations < 1) return;
	  firstShufflerShuffle();
	  // pause before next fade
          setTimeout("firstShufflerFade()",firstPauseSeconds*1000);
	}
	else
	{
	  firstOpacity -= fadeDelta;
	  setOpacity(theimgFirst,firstOpacity);
	  setTimeout("firstShufflerFade()",30);  // 1/30th of a second
	}
  }

  function firstShufflerShuffle()
  {
	var thedivFirst = document.getElementById(firstPhotoShufflerDivId);
	var theimgFirst = document.getElementById(firstPhotoShufflerImgId);
	
	// copy div background-image to img.src
	theimgFirst.src = firstImg[firstOnDeck];
	// set img opacity to 100
	setOpacity(theimgFirst,100);

        // shuffle the deck
	firstOnDeck = ++firstOnDeck % firstDeckSize;
	// decrement rotation counter
	if (--firstImageRotations < 1)
	{
	  // insert start/final image if we're done
	  firstImg[firstOnDeck] = firstStartImg;
	}

	// slide next image underneath
	thedivFirst.style.backgroundImage='url(' + firstImg[firstOnDeck] + ')';
  }

function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;
  
  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";
  
  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;

  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;

  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}

//--><!]]>