if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
    var ieversion=new Number(RegExp.$1); // capture x.x portion and store as a number
    
    if (ieversion >= 8) {
        switchCss();
    }
    else if (ieversion <= 7) {
        showAdvice();
    }
}


function switchCss() {
    (document.createStyleSheet) ? document.createStyleSheet("/css/body-css2.css") : $('<link rel="stylesheet" href="/css/body-css2.css" type="text/css" />').appendTo('head');
}  

function showAdvice() {
    $(location).attr('href','/site/outdatedBrowser');
}
