window.addEvent('domready', function() {
	if($$('.imageItem')){
		var bulles = new Tips($$('.imageItem'), {
			timeOut		: 700,
			maxTitleChars	: 50,
			hideDelay		: 200,
			className		: 'custom', //for you yo use in the css classes being then .tip .tip-title and .tip-text
			onShow		: function(tip){
				tip.setStyle('opacity', '0.9');
			}
		});
	}
});


window.addEvent('domready', function() {
	if($('toogleInfo')){
		var mySlide = new Fx.Slide('toogleInfo');
		mySlide.hide();
 		$('toogleHeader').addEvent('click', function(e){
			e = new Event(e);
			mySlide.toggle();
			e.stop();
		});
	}
});

window.addEvent('domready', function() {
	var elements = $$('.arrowLeft');
	elements.each(function(element, i) {
		element.addEvent('click', function(e){
			property = this.getProperty('switch');
			parents = this.getParent().getParent();
			children = parents.getChildren();
			children.each(function(node, i) {
				if(node.className == 'imageItem'){
					val = '<a href="'+property+'" target="_blank"><img src="create_image.php?image='+property+'&size=80" border="0" /></a>';
					node.set('html', val);
				}
			});			
		});
	});

	var elements = $$('.arrowRight');
	elements.each(function(element, i) {
		element.addEvent('click', function(e){
			property = this.getProperty('switch');
			parents = this.getParent().getParent();
			children = parents.getChildren();
			children.each(function(node, i) {
				if(node.className == 'imageItem'){
					val = '<a href="'+property+'" target="_blank"><img src="create_image.php?image='+property+'&size=80" border="0" /></a>';
					node.set('html', val);
				}
			});			
		});
	});
});





