﻿jQuery.ie6Alert = function(mainText) {
    if($.browser.msie && $.browser.version=="6.0") {
        var links =
            '<div>Install: '
            + '<a href="http://www.microsoft.com/ie8/">IE8</a> or ' // ie8 or
            + '<a href="http://www.mozilla-europe.org/cs/firefox/">Firefox</a> or ' // firefox or
            + '<a href="http://www.opera.com/download/">Opera</a> or ' // opera or
            + '<a href="http://www.google.com/chrome/">Chrome</a> or ' // chrome or
            + '<a href="http://www.apple.com/safari/download/">Safari</a> ' // safari
            + '</div>'; // simple another new browser
        var html = '<div class="ie6alert">' + mainText + links + '</div>'
        $("body").prepend(html)
        // add css to div.ie6alert
        $('.ie6alert')
            .css("color", "#fff")
            .css("border", "0")
            .css("border-bottom", "2px #6c2014 solid")
            .css("margin", "0")
            .css("padding", "10px")
            .css("font", "bold 16px Helvetica, Arial, sans-serif")
            .css("text-align", "center")
            .css("background-color", '#b63e2e');
        // add css to div with links
        $('.ie6alert div')
            .css('margin-top', '10px')
            .css("font-size", "12px");
        // add css to link
        $('.ie6alert div a')
            .css('color', '#fff')
            .css('font-weight', 'bold')
    }
}

// start with

$(document).ready(function(){
    $.ie6Alert('Please update your web browser');
});
