// <![CDATA[

$(document).ready(function() {

	$("#frm_newsletter").submit(function() {
		var email = $("#email").val();
		var lg = $("#lg").val();
		window.open('newsletters.php?lg='+lg+'&email='+email, 'news_resultado', 'width=317,height=100,status=yes,resizable=yes,scrollbars=yes');
		return false;
	});
	
	//Não usado mais. Troquei pelo Thickbox (much better)
	$('.foto_produto').click(function() {
		var imagem = $(this).attr('href');
		window.open('pop_img.php?img='+imagem, 'ampliada', 'width=400, height=400, resizable=yes');
		return false;
	});
	
	//Não uso mais. Só velharias aqui???
	startList = function() {
		if (document.all&&document.getElementById)
		{
			navRoot = document.getElementById("nav");

			// O elemento nav não aparece sempre
			//apenas quando o menu produtos está selecionado 
			if (navRoot)
			{
				for (i=0; i<navRoot.childNodes.length; i++)
				{
					node = navRoot.childNodes[i];
					if (node.nodeName=="LI")
					{
						node.onmouseover = function()
						{
							this.className+=" over";
						}
						node.onmouseout=function()
						{
							this.className=this.className.replace
							(" over", "");
						}
					}
				}
			}
		}
	}
	
	//startList();

	$('a.vantagens_newsletter').click(function() {
		window.open($(this).attr('href'), 'vantagens', 'width=400, height= 450');
		return false;
	});
	
});

// ]]>
