$(document).ready(function(){
	drawIEBar();
});

function drawIEBar() {

	if ($.browser.msie && $.browser.version.substr(0,1)<7) {
		// set style
		var w_style = 'display: block;';
		w_style += 'position: relative;';
		w_style += 'top: -23px;';
		w_style += 'left: 0;';
		w_style += 'z-index: 1000;';
		w_style += 'width: 100%;';
		w_style += 'height: 22px;';
		w_style += 'line-height: 22px;';
		w_style += 'background: #ffffe1;';
		w_style += 'padding: 0 5px 3px 5px;';
		w_style += 'border-bottom: 1px solid #000;';
		w_style += 'color: #000;';
		w_style += 'font-weight: normal;';
		w_style += 'font-size: 11px;';
		w_style += 'font-family: arial;';
		w_style += 'text-decoration: none;';
		w_style += 'cursor: default;';
		
		// set text
		var w_text = " This site might require the following browser update:";
		w_text += " 'Internet Explorer 8' from 'Microsoft Corporation'. Click here to install...";
		
		// set link
		var w_link = "http://www.microsoft.com/windows/Internet-explorer/default.aspx";
		
		var w_img = '<img src="/application/admin/images/IEshield.gif" style="position: relative; top: 3px;" border="0" />';
	
		$('body').prepend('<div id="ie_check"><a href="'+w_link+'" style="'+w_style+'" rel="_blank">'+w_img+w_text+'</a></div>').find('#ie_check a').animate({'top':'0px'});
		
		$('#ie_check a').hover(function(){
			$(this).css({'background':'#316ac5', 'color':'#fff'});
		},function(){
			$(this).css({'background':'#ffffe1', 'color':'#000'});
		});
		
		$('#ie_check a[rel="_blank"]').each(function(){ $(this).attr('target', '_blank'); });
	}
}
