//window.addEvent('domready', init);
	function init() {
		//myTabs1 = new mootabs('myTabs', {height: '600px', width: '423px', useAjax: true, ajaxUrl: 'listaimoveis.asp', mouseOverClass: 'over', ajaxLoadingText: '<p style="color:#333; font:bold 12px arial;"><img src="imagens/spinner.gif"> Consultando...</p>'});
		myTabs1 = new mootabs('myTabs', {height: '760px', width: '423px', mouseOverClass: 'over'});
	}
window.addEvent('domready', function(){
    init();
	var aluguel = $$('#result-imovel tr');
	var venda = $$('#result-imovel2 tr');	
	var Tips1 = new Tips($$('.Tips1'), {
	initialize:function(){
		this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
	},
	onShow: function(toolTip) {
		this.fx.start(1);
	},
	onHide: function(toolTip) {
		this.fx.start(0);
	}
});
	aluguel.each(function(item) {
		item.addEvent('mouseover', function() {
			item.addClass('white');
			//alert(item.getProperty('class'));
		});
		item.addEvent('mouseleave', function() {
			item.removeClass('white');
		});
		item.addEvent('click', function() {
			var url = 'imoveis/detalhe_imovel.asp?modo=aluguel&id='+ item.id;
			//location.href(url);
			if (item.id == '') {
				return false;
				} else {
				////alert(url);	
				//document.location.href(url);
				window.location = url;
				}
			//alert(url);
		});
	});
	venda.each(function(item) {
		item.addEvent('mouseover', function() {
			item.addClass('white');
		});
		item.addEvent('mouseleave', function() {
			item.removeClass('white');
		});
		item.addEvent('click', function() {
			var url = 'imoveis/detalhe_imovel.asp?modo=venda&id='+ item.id;
			//location.href(url);
			if (item.id == '') {
				return false;
				} else {
				//alert(url);
				//document.location.href(url);
				window.location = url;
				}
		});
	});

//	var scroll = new Fx.Scroll('banner', {
//	wait: false,
//	duration: 1000,
//	offset: {'x': -702, 'y': 0},
//	transition: Fx.Transitions.Quint.easeOut
//	});
//	
//	$('link1').addEvent('click', function(event) {
//	event = new Event(event).stop();
//	scroll.toElement('prop1');
//	});
// 
//$('link2').addEvent('click', function(event) {
//	event = new Event(event).stop();
//	scroll.toElement('prop2');
//});
//$('link3').addEvent('click', function(event) {
//	event = new Event(event).stop();
//	scroll.toElement('prop3');
//});

		var noob = new noobSlide({
			box: $('banners'),
			items: $ES('div','banners'),
			size: 702,
			autoPlay: true,
			interval: 5000,
			mode: 'horizontal',
			fxOptions: {
				duration: 1000,
				transition: Fx.Transitions.Quart.easeInOut,
				wait: false
			},
//			buttons: {
//				previous: $('prev'),
//				next: $('next')
//			}
			handles: $ES('a','numbers'),
			onWalk: function(currentItem,currentHandle){
				//style for handles
				this.handles.extend(handles8_more).removeClass('on');
				$$(currentHandle,handles8_more[this.currentIndex]).addClass('on');
			}
		});
		var handles8_more = $ES('a','numbers');
		noob.addHandleButtons(handles8_more);
		noob.walk(0);

});
//]]>
