function detectMacXFF() {
  var userAgent = navigator.userAgent.toLowerCase();
  if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
    return true;
  }
}

  var yourShade = document.getElementById('gallery');
  var d = detectMacXFF();
  if (d) {
    //osx ff css opacity + flash wmode transparent doesn't work
    yourShade.style.backgroundImage= "url(/images/test.png)";
    yourShade.style.backgroundRepeat="repeat";
  } else {
    yourShade.style.backgroundColor = "#FFFFFF";
    yourShade.style.MozOpacity = .30;
    yourShade.style.opacity = .30;
    yourShade.style.filter = "alpha(opacity=30)";
  }
