/**!
 * Adeus IE6 v1.0.2
 * http://www.mateussouza.com/adeus-ie6/
 *
 * Copyright 2010
 * By Mateus Souza - http://www.mateussouza.com
 * Licensed under MIT and GPL License - http://www.opensource.org/licenses/mit-license.php || http://www.gnu.org/licenses/gpl.html
 */
(function($){

$(window).bind('load', function(){
		
			var AdeusIE6 = '<div id="adeus-ei6-fundo"></div>\n\
					<div id="adeus-ie6">\n\
						<div id="adeus-ie6-topo">\n\
							<h3>Voc&ecirc; est&aacute; usando um navegador muito antigo...</h3>\n\
							<p>A sua vers&atilde;o do Internet Explorer n&atilde;o &eacute; suportada por este site.<br /> Por favor, atualize seu navegador.</p>\n\
							<ul>\n\
								<li>Ganhe mais seguran&ccedil;a contra v&iacute;rus e spywares.</li>\n\
								<li>Tenha melhores experi&ecirc;ncias v&iacute;suais.</li>\n\
								<li>Total Compatibilidade com este website e muito mais.</li>\n\
							</ul>\n\
						</div>\n\
						<div id="adeus-ie6-rodape">\n\
							<div id="adeus-ie-botao">\n\
								<a href="http://www.microsoft.com/downloads/details.aspx?familyid=341c2ad5-8c3d-4347-8c03-08cdecd8852b&displaylang=pt-br" title="Atualize já seu Internet Explorer para uma versão mais recente!!!">Atualizar Navegador</a>\n\
							</div>\n\
							<div id="adeus-ie6-outros">\n\
								<span>Use tamb&eacute;m outros navegadores:</span>\n\
								<a href="http://www.google.com/chrome?hl=pt-BR" title="Google Chrome">\n\
									<span class="iChrome"></span>\n\
								</a>\n\
								<a href="http://pt-br.www.mozilla.com/pt-BR/" title=Firefox>\n\
									<span class="iFirefox"></span>\n\
								</a>\n\
								<a href="http://www.opera.com/download/" title=Opera>\n\
									<span class="iOpera"></span>\n\
								</a>\n\
							</div>\n\
						</div>\n\
					</div>';
			
			function ajustaPosicaoAdeusIE6(e){

				//Propriedades Window
				var $w = $(window),
					wh = $w.height(),
					ww = $w.width(),
					wst = $w.scrollTop(),
					wsl = $w.scrollLeft(),
				
				//Propriedades Body
					mt = parseFloat($('body').css('margin-top')),
					ml = parseFloat($('body').css('margin-left'));

				$('body').css({
					height: wh - mt - 20,
					width: ww - ml - 20
				});
				
				$('#adeus-ei6-fundo').css({
					height: wh + wst,
					width: ww + wsl
				});

				$('#adeus-ie6').css({
					top: ($('body').height()/2) + mt + wst,
					left: ($('body').width()/2) + ml + wsl
				});
				
			};
			
			$('body').css({
				overflow: 'hidden',
				display: 'block'
			}).append(AdeusIE6);
			
			ajustaPosicaoAdeusIE6();
			
			//Resize
			$(window).resize(ajustaPosicaoAdeusIE6).scroll(ajustaPosicaoAdeusIE6);
			
			$('#adeus-ie6 p span').html($.browser.version);
			
			$('#adeus-ei6-fundo').hide().fadeIn(1000)
			
	});

}(jQuery));
