/* Logo Glow Animation */
jQuery(document).ready(function() {
  if(isIE()){
    //Do Something for IE
  } else {
    logoGlow();
  }
});

var myToggle = 0;

function logoGlow() {
  jQuery('#header h1 a img').css({"opacity":"0.0", "display":"block"});
  jQuery('#header h1 a img.fence-noGlow').css({"opacity":"1.0", "z-index":"10"});
  jQuery('#header h1 a img.fence-whiteGlow').css({"opacity":"0.0", "z-index":"10"}).animate({opacity: 1.0}, 200);
  jQuery('#header h1 a img.text-noGlow').animate({opacity: 0.0}, 800).animate({opacity: 1.0}, 500);
  jQuery('#header h1 a img.full-whiteGlow').animate({opacity: 0.0}, 1000).delay(1000).animate({opacity: 1.0}, 1000);
  setInterval('radiate()',4000);
}

function radiate() {
  if(myToggle%2 == 0){
    jQuery('#header h1 a img.text-orangeGlow').animate({opacity: 1.0}, 800).delay(800).animate({opacity: 0.0}, 800);
  } else {
    jQuery('#header h1 a img.text-blueGlow').animate({opacity: 1.0}, 800).delay(800).animate({opacity: 0.0}, 800);
  }
  myToggle++;
};

/*	THIS WAS AN ATTEMPT AT FIXING IE's jQuery Fade bug!!!
function logoGlow() {
  jQuery('#header h1 a span').css({"opacity":"0.0", "display":"block"});
  jQuery('#header h1 a span.fence-noGlow').css({"opacity":"1.0", "z-index":"10"});
  jQuery('#header h1 a span.fence-whiteGlow').css({"opacity":"0.0", "z-index":"10"}).animate({opacity: 1.0}, 200);
  jQuery('#header h1 a span.text-noGlow').animate({opacity: 0.0}, 800).animate({opacity: 1.0}, 500);
  jQuery('#header h1 a span.full-whiteGlow').animate({opacity: 0.0}, 1000).delay(1000).animate({opacity: 1.0}, 1000);
  setInterval('radiate()',4000);
}

function radiate() {
  if(myToggle%2 == 0){
    jQuery('#header h1 a span.text-orangeGlow').animate({opacity: 1.0}, 800).delay(800).animate({opacity: 0.0}, 800);
  } else {
    jQuery('#header h1 a span.text-blueGlow').animate({opacity: 1.0}, 800).delay(800).animate({opacity: 0.0}, 800);
  }
  myToggle++;
};
*/

function isIE() {
  return (jQuery.browser.msie);
}

