jQuery(document).ready(function() {
	//showRoom
	jQuery('.showRoom').jcarousel({ visible: 10});

	//tooltips
	jQuery('.tooltip').Tooltip({ 
		delay: 100, 
		track: true,
		showURL: false,
		showBody: " # "
	});
	
	//Banner
	jQuery('ul#imagens').innerfade({
		speed: 2000,
		timeout: 5000,
		type: 'sequence',
		containerheight: '220px'
	});
    
});


/*Mootools*/

var Site = {
	init: function() {
		if ( $('liquid') )    Liquid.parseLiquids();
		}
};

var Liquid = {

	parseLiquids: function(){
		var liquids = $$('#liquid .liquid');
		var fx = new Fx.Elements(liquids, {wait: false, duration: 800, transition: Fx.Transitions.elasticOut});
		liquids.each(function(liquid, i)
		{
			liquid.addEvent('mouseover', function(e)
			{
				e = new Event(e).stop();
				var obj = {};
				obj[i] = { 'width': [liquid.getStyle('width').toInt(), 350] };

				liquids.each(function(other, j)
				{
					if (other != liquid)
					{
						var w = other.getStyle('width').toInt();
						if (w != 175) obj[j] = {'width': [w, 175]};
					}
				});
				fx.start(obj);
			});
		});

		document.addEvent('mouseover', function(e){
			//e = new Event(e);
			//var rel = e.relatedTarget;
			//if (!rel) return;
			//if (rel.hasClass && (rel.hasClass('liquids') || rel.hasClass('liquid') || rel.id == 'liquid')){
				var obj = {};
				liquids.each(function(other, j){
					obj[j] = {'width': [other.getStyle('width').toInt(), 230]};
				});
				fx.start(obj);
			//};
		});
	}
};

//window.onDomReady(Site.init);
    

