var Geral = {

	__construct: function() {
		_this = Geral;
		$("input[type='text'],textarea").resetDefaultValue();
		$("input[type='text']").addClass("text");
		$("#sidebar01 li:last,#box01 li:last").css("borderBottom","none");
		$.scrollTo.defaults.axis = 'xy';
		$('#thumbs').scrollTo(0);
		$('a#moveLeft').click(_this.moveLeft);
		$('a#moveRight').click(_this.moveRight);
		_this.dropdown();
		_this.linhas_tabela();
	},
	
	atual: 3,

	moveLeft: function() {
		_this = Geral;
		atual = _this.atual;
		
		if (atual > 3) {
			_this.atual--;
			$('#thumbs').scrollTo({top:0, left:'-=110px'}, 600);
		}
	},
	
	moveRight: function() {
		_this = Geral;
		atual = _this.atual;
		var tam = $("#thumbs div").length;
		if ((tam > 4) && (atual != tam-1)) {
			_this.atual++;
			$('#thumbs').scrollTo({top:0, left:'+=110px'}, 600);
		} else {
			_this.atual = 3;
			$('#thumbs').scrollTo(0, 1000);
		}
	},

	dropdown: function() {
		$("ul li ul").hide();
		$("ul.nav li").hover(
			function() {
				$(this).find("ul").show().end().children("a").css("fontWeight","bold");
			},
			function() {
				$(this).find("ul").hide().end().children("a").css("fontWeight","normal");
			}
		);
	},
	
	linhas_tabela: function() {
		$("table#hoteis tr:even").css("backgroundColor","#902626");
	}

}

$(document).ready(function(){
	Geral.__construct();
});
