var COOKIE_NAME = 'STP';

$.browser.msie6 = $.browser.msie &&
    parseInt($.browser.version) == 6 &&
    !window["XMLHttpRequest"];

if($.browser.msie6){
  $(function(){
    if ($.cookie(COOKIE_NAME) == null) {

      /**
       * Show notice
       */
      $('<div id="shadow_cover">').css({
        'opacity': '0.5',
        'height': $(document).height()
      }).appendTo("body");

      $('<div id="message-box"><h4>Important notice</h4><div id="close_btn"></div><div class="break_line"></div><h3>We do not support Internet Explorer 6.</h3> <p>Please upgrade to <a href="http://www.microsoft.com/rus/windows/internet-explorer/">Internet Explorer 8</a>, <a href="http://www.mozilla.com/firefox/">Mozilla Firefox</a>, <a href="http://www.google.com/chrome">Google Chrome</a>, <a href="http://www.apple.com/safari/">Apple Safari</a> or proceed at your own risk.</p></div>').css({
        'top': '50%',
        'left': '50%',
        marginLeft: -210,
        marginTop: -100,
        'opacity': '1',
        'textAlign': 'left',
        'height': 154
      }).appendTo("body");
    }

    /**
     * Close notice
     */
    $(function(){
      $("#close_btn").bind("click", function(){
        $("#message-box").fadeOut('0.5');
        $("#shadow_cover").fadeOut('0.5');
        var date = new Date();
        date.setTime(date.getTime() + (1000 * 24 * 60 * 60));
        $.cookie(COOKIE_NAME, "1", { expires: date });
      });
    });
  });
}


