var Geral = {

	__construct: function() {
		_this = Geral;
		$.ifixpng('pics/pixel.gif');
		$('div.thumbs,img[@src$=.png]').ifixpng(); //png transparent no IEca
		$("input[type='text'],textarea").resetDefaultValue();
		$("input[type='text']").addClass('text');
		_this.nav(); //trocar cor da borda
		_this.miniGaleria();
	},
	
	nav: function() {
		$("div#nav ul li").hover(
			function() {
				$(this).css("backgroundColor","#944040");
			},
			function() {
				$(this).css("background","none");
			}
		);
	},
	
	miniGaleria: function() {
		$("ul#foto li:not(:first)").hide();
		var $anterior = $("ul#foto li:nth-child(1)");
		var click = false;
		$("ul#thumbnail li a").click(function() {
			if (click)
                return;
            click = true;
			$anterior.hide();
			$clicked = $('ul#thumbnail li').index($(this).parent());
			$atual = $("ul#foto li:nth-child("+($clicked+1)+")");
			$atual.show("slow", function() {
				click = false;
				$anterior = $atual;
			});
			return false;
		});
	}

}

$(document).ready(function(){
	Geral.__construct();
});
