
	function performOnLoad() {
		
		//Logotipo
		$('#logo').html('<a href="/" title="Homepage do Classificados em Portugal"><img src="/images/logo.png" width="596" height="60" alt="Classificados em Portugal"/></a>');
		
		//Botões do menu
		$("#top1 #menu A").each(function(i) {
			$(this).bind(
				"mouseover",
				function() {
					if (i>0) {
						var prevID="#menu"+(i-1);
						$(prevID).addClass("previous");
					}
				}
			);
			$(this).bind(
				"mouseout",
				function() {
					if (i>0) {
						var prevID="#menu"+(i-1);
						$(prevID).removeClass("previous");
					}
				}
			);
		});
		
		//Caixas na Homepage
		$(".homeSection").each(function(i) {
			$(this).bind(
				"mouseover",
				function() {
					$(this).addClass("homeSectionActive");
				}
			);
			$(this).bind(
				"mouseout",
				function() {
					$(this).removeClass("homeSectionActive");
				}
			);
		});
		
		
		//Caixa de filtragem
		$(".filtragem").each(function(i) {
			$(this).bind(
				"mouseover",
				function() {
					$(this).addClass("filtragemActiva");
				}
			);
			$(this).bind(
				"mouseout",
				function() {
					$(this).removeClass("filtragemActiva");
				}
			); 
		});
		
		//Caixa de filtragem - Auto submissão do formulário
		$(".filtragem SELECT").each(function() {
			$(this).bind(
				"change",
				function() {
					$("#formfiltra").submit();
				}
			);
		});
		
		//Listagem de anúncios
		$(".anuncio").each(function(i) {
			$(this).bind(
				"mouseover",
				function() {
					$(this).addClass("anuncioActivo");
				}
			);
			$(this).bind(
				"mouseout",
				function() {
					$(this).removeClass("anuncioActivo");
				}
			);
		});
		$(".anuncioLink").each(function(i) {
			$(this).bind(
				"click",
				function() {
					window.location=$("#"+this.id+"_link").attr("href");
				}
			); 
		});
		
	}
	//performOnLoad - End
	
	
	
	$(document).ready(function(){
		performOnLoad();
	});