function funkyshadow() {
  var h1Set = document.getElementsByTagName('h1');  // Grab a list of all the H1s 
  var headings = [];                                // Set up a new 'working' array
  for (var i = 0; i < h1Set.length; i++) {          // Loop through every item in h1set
    headings[i] = h1Set[i];                         // copy whatever's in 'h1set' to 'headings'
  }                                                 // end loop                                                 // stuck in an infinite loop :(
  
  for (var i = 0; i < headings.length; i++) {       // New loop for createing new H1s
 
    var outerh1 = document.createElement('h1');    // Now create the outer-most H1.
    outerh1.innerHTML = headings[i].innerHTML;     // pop the text inside the outerh1.
    var middleh1 = document.createElement('h1');   // Create the middle H1. 
    middleh1.innerHTML = headings[i].innerHTML;    // put the text inside the middleh1.

    headings[i].parentNode.replaceChild(outerh1, headings[i]);// Replace the original H1 with 'outerh1' 
                                            	              // - we'll pop the other H1s inside it.

    outerh1.appendChild(middleh1);                // Stick middle H1 inside the outer.
    middleh1.appendChild(headings[i]);	          // Stick the original inside middle.

    outerh1.style.color = '#C6BC7F';             //  This is the outer-most h1 - it's set to a darker
  }                                              //  color in the CSS, but if the JS works we 
}                                                //  need to change it to the shadow color.

window.onload = funkyshadow;                     //  Run the function
