$(document).ready(function() {
	
	$(".image > img").fadeTo(0, 0);
	
	$(".links > div").each(function(i) {
		new myImagesMenue({
			obj: $(this),
			id: $(this).attr("id"),
			text: $(this).find(".link_text").html(),
			txt: $(".ibtext .ibtextbg").html()
		});							
	});
	
});

var myImagesMenue = $.Class.create({
  
	init: function(element) {
		
		this.id = element.id;
		this.obj = element.obj;
		this.text = element.text;
		this.txt = element.txt;
	
		this.obj
			.bind('mouseover', {obj: this}, function(sEvent) { 	
				sEvent.data.obj.showInformation();
			})
			.bind('mouseout', {obj: this}, function(sEvent) {
				sEvent.data.obj.hideInformation();
			});
	},
	
	hideInformation: function() {
		
		$(".ibtext > .ibtextbg")
			.html(this.txt);
		
		this.obj
			.removeClass("l_act");
		
		$("img#" + this.id)
			.stop()
			.fadeTo(500, 0);
		
	},
	  
	showInformation: function() {
		
		$(".ibtext > .ibtextbg")
			.html(this.text);
			
		this.obj
			.addClass("l_act");

		$("img#" + this.id)
			.stop()
			.fadeTo(500, 1);
	
	}
	
});
