/* F*cking IE6- */

$(document).ready(function() {

  browser = navigator.userAgent;
  check   = browser.match(/MSIE (([3-6])(\.[0-9]*)?)/);

  // RegExp 2 JS5-
  /* check = new RegExp("MSIE (([3-6])(\.[0-9]*)?)");
     check = check.exec(browser); */

  if(check)
  {
    div_text = "<div id=\"fk_ie\" style=\"position:absolute; filter:alpha(opacity=95); display:none; left: 0px; border-bottom: solid 1px #DFDDCB; top:0px; margin: 0px; padding: 5px 0px; width: 100%; color: #4F4D3B; background: #FFFCDF; font: normal 8pt/14px 'Trebuchet MS', Arial, Helvetica; text-align: center; z-index: 10\">Voc&ecirc; est&aacute; usando <strong>Internet Explorer "+check[1]+"</strong>, um navegador antigo e com falhas de seguran&ccedil;a. Por favor <a href=\"http://www.updateyourbrowser.net/\" style=\"color: #4F4D3B; text-decoration: underline; font: normal 8pt/14px 'Trebuchet MS', Arial, Helvetica;\" target=\"_blank\">atualize seu navegador</a>. <a href=\"javascript://\" id=\"fk_close\" style=\"color: #4F4D3B; text-decoration: underline; font: normal 8pt/14px 'Trebuchet MS', Arial, Helvetica;\">[x]</a></div>"; 
    if(check[2] < 6)
    {
      get_tag = document.getElementsByTag('body'); 
      get_tag.innerHTML = get_tag.innerHTML+div_text;
      /* IE5- */
      document.getElementById("fk_ie").style.display = "block";
    }
    else 
		{
      $('body').prepend(div_text);
      $('#fk_ie').fadeIn(1000);	
    } 
		$('#fk_close').click(function(){ $('#fk_ie').fadeOut(400); });   
  }
}
);
