// JavaScript Document for Wendy's var x; var popup = new Array(); popup[0] = 'crew-one'; popup[1] = 'crew-two'; popup[2] = 'crew-three'; // called when document loads. Hides 2nd and 3rd boxes function hideBoxes(){ document.getElementById("crew-one").style.display = 'none'; document.getElementById("crew-two").style.display = 'none'; } // switches the boxes function box(i){ for (x=0; x<3; x++){ document.getElementById(popup[x]).style.display = 'none'; } document.getElementById(popup[i]).style.display = 'block'; // handles tab selections if(i == 0){ document.getElementById("btn-one").style.backgroundPosition = 'top'; document.getElementById("btn-two").style.backgroundPosition = 'bottom'; document.getElementById("btn-three").style.backgroundPosition = 'bottom'; } if(i == 1){ document.getElementById("btn-one").style.backgroundPosition = 'bottom'; document.getElementById("btn-two").style.backgroundPosition = 'top'; document.getElementById("btn-three").style.backgroundPosition = 'bottom'; } if(i == 2){ document.getElementById("btn-one").style.backgroundPosition = 'bottom'; document.getElementById("btn-two").style.backgroundPosition = 'bottom'; document.getElementById("btn-three").style.backgroundPosition = 'top'; } }