$(document).ready(function(){
	
	//Cufon.replace('#nav', { fontFamily: 'dam2', hover: { color: 'black' }, hoverables:{li:false} });
	//Cufon.replace('h1', { fontFamily: 'dam2', hover: { color: 'black' }, hoverables:{li:false} });
	//Cufon.replace('h2', { fontFamily: 'dam2', hover: { color: 'black' }, hoverables:{li:false} });
	//Cufon.replace('h3', { fontFamily: 'dam2', hover: { color: 'black' }, hoverables:{li:false} });
	
	/*
	$("#c1").hide();
	$("#c2").hide();
	$("#c3").hide();
	$("#c4").hide();
	$("#c11").hide();
	*/
	
	//Popups
	$('.megaPopup').popupWindow({ 
		centerBrowser:1,
		height: 600,
		width:800,
		scrollbars:1,
		resizable:1
	}); 
	
	
	$('.linhasPopup').popupWindow({ 
			centerBrowser:1,
			scrollbars:1,
			height: 600,
			width:800,
			resizable:1
	}); 
	
	
	//Tooltips
	/*
	$(".thumbSubCat").tooltip({	
		// tweak the position
		   offset: [10, 2],

		   // use the "slide" effect
		   effect: 'slide'
	}).dynamic({ bottom: { direction: 'down', bounce: true } });
	*/
	
	
	
	
	
	
	
	
	
	//Pretty Photo
	$("a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'});
	
	$("#i1").live("click",function(){
		$("#c1").toggle();
	});
	







	
	// OUTROS ITENS DO MENU 		
	$(".menuVertItem").mouseover(function () {
		$(this).css('background-color', '#cec1b0');
	});

	$(".menuVertItem").mouseout(function () {
		$(this).css('background-color', '#ece8e3');
	});



	
	$(".menuVertItem").click(function(){
		var url = $(this).find("a").attr("href");
		var url2 = $(this).find("input:hidden").val();
		if(url!=undefined){
			window.location=url;
		}else{
			window.location=url2;
		}
	});
	
	
	

	$(".menuVertItem_").click(function(){
		//alert("menuVertItem");
		
		var strUrl = $(this).siblings("input[name='url']").val();
		//alert(strUrl);
		
		if($(this).children("span").attr("id") == "btnMenuVertPrecarios"){
			//precariosClick();
			window.location= "/index.php/inicio/menu-vertical/precarios/ar-condicionado/domestico/";
		}
		else if($(this).children("span").attr("id") == "btnMenuVertProdutos"){
			//produtosClick();
			window.location = "/index.php/inicio/menu-vertical/sobre_produtos/purificador/";
		}
		else if($(this).children().children("span").attr("id") == "btnMenuVertInformacao"){
			//informacoesClick();
			window.location = "/index.php/inicio/menu-vertical/informacoes-uteis/como-funciona-o-ar-condicionado/";
		}
		else{
			window.location = strUrl;
		}
	});
	
	
	
	// menuVertItemNiv2 
	
	$(".menuVertItemNiv2").mouseover(function () {
		$(this).css('fontWeight', '800');
	});

	$(".menuVertItemNiv2").mouseout(function () {
		$(this).css('fontWeight', '100');
	});

	
	$(".menuVertItemNiv2").click(function(){
		var url = $(this).find("a").attr("href");
		window.location=url;
	});
	
	
	
	$(".menuVertItemNiv2_").click(function(){
		//alert();
		if($(this).children("span").attr("id") == "btnMenuVertPrecarios"){
			//precariosClick();
		}
		else if($(this).children("span").attr("id") == "btnMenuVertProdutos"){
			//produtosClick();
		}
		else if($(this).children("span").attr("id") == "btnMenuVertInformacao"){
			//informacoesClick();
		}
		else{
				var strUrl = $(this).siblings("input[name='url']").val();
				window.location = strUrl;
		}
	});
	
	
	// menuVertItemNiv3
	
	$(".menuVertItemNiv3").mouseover(function () {
		$(this).css('fontWeight', '800');
	});

	$(".menuVertItemNiv3").mouseout(function () {
		$(this).css('fontWeight', '100');
	});
	
	$(".menuVertItemNiv3").click(function(){
		var url = $(this).find("a").attr("href");
		window.location=url;
	});
	
	
	
	
	// PREÇÁRIOS - PRINT
	
	$(".btnPrint").click(function(){
		$(".tabelaLinha").hide();
	});
	
	
	
	
	
	// MARQUEE
	
	$('div.demo marquee').marquee();
	
	
});
