var $first;
var $curactive;
IMG_NAV = jQuery.klass({

	initialize: function(arg) {
		$(this.element).css('cursor', 'pointer');
		$first = $(this.element)
			.parent()
			.parent()
			.find('li')
			.first();
		$curactive = $first;
		
		$first.find('.messen_detail_img, .messen_detail_text').fadeIn(500);

		showNav = function() {
			$(this)
				.parent()
				.parent()
				.find('.messen_detail_img, .messen_detail_text')
				.stop(true, true)
				.fadeOut(500);
			$(this)
				.parent()
				.find('.messen_detail_img, .messen_detail_text')
				.stop(true, true)
				.fadeIn(500);
		}
		hideNav = function() {

		}
		var config = {
			over: showNav, // function = onMouseOver callback (REQUIRED)
			timeout: 100, // number = milliseconds delay before onMouseOut
			out: hideNav // function = onMouseOut callback (REQUIRED)
		};
		this.element.hoverIntent(config)

		$(this.element).bind('click', function(event) {
			$(this)
				.parent()
				.parent()
				.find('.messen_detail_img, .messen_detail_text')
				.stop(true, true)
				.fadeOut(500);
			$(this)
				.parent()
				.find('.messen_detail_img, .messen_detail_text')
				.stop(true, true)
				.fadeIn(500);
		});




		
	},
	onmouseover: function() {
		$(this.element).css('cursor', 'pointer');




		

	},

	onmouseout: function() {
		
		
		/*if($(this.element).parent().get(0) === $first.get(0) ){
			
		}else{
			$(this.element)
			.parent()
			.parent()
			.find('.messen_detail_img, .messen_detail_text')
			.stop(true, true)
			.fadeOut(500);
		}
		$first.find('.messen_detail_img, .messen_detail_text').fadeIn(500);*/
	}
});



 



