
// Rollover 
function smartRollover() {  
    if(document.getElementsByTagName) {  
        var images = document.getElementsByTagName("img");  
        for(var i=0; i < images.length; i++) {  
            if(images[i].getAttribute("src").match("_Off."))  
            {  
                images[i].onmouseover = function() {  
                    this.setAttribute("src", this.getAttribute("src").replace("_Off.", "_On."));  
                }  
                images[i].onmouseout = function() {  
                    this.setAttribute("src", this.getAttribute("src").replace("_On.", "_Off."));  
                }  
            }  
        }  
    }  
}  
if(window.addEventListener) {  
    window.addEventListener("load", smartRollover, false);  
}  
else if(window.attachEvent) {  
    window.attachEvent("onload", smartRollover);  
}


// SwitchCSS
var os = (navigator.appVersion.indexOf ("Win", 0) != -1) ? "win" : "mac";
document.write ('<link rel="stylesheet" type="text/css" href="/css/' + os + '.css">');


// InlineBgFix
$.fn.extend({
  inlineBgFix: function() {
    if ($.browser.msie && $.browser.version < 8.0) {
      $(this)
        .addClass('inline-bg-fix')
        .prepend('<span class="bg-l">&nbsp;</span>')
        .append('<span class="bg-r">&nbsp;</span>');
    }
  }
});

$(function() {
  $('a.LinkNewWinIn').inlineBgFix();
});

$(function() {
  $('a.LinkFwd').inlineBgFix();
});

