jQuery(document).ready(function(){
	jQuery('#nav_specialchangenavigation').children('ul.level_1').children('li').mouseenter(function(){
		jQuery(this).children('ul.level_2').show();
		
		if (!(jQuery(this).hasClass('first')))
		{
			jQuery(this).children('ul.level_2').css('left', '-40px');
		}
		
		maxWidth = 980;
		positionLeft = jQuery(this).position().left;
		ulWidth = jQuery(this).children('ul.level_2').width();
		
		if ((maxWidth - ulWidth) < positionLeft)
		{
			jQuery(this).children('ul.level_2').css(
				'left', '-' + ((2 + positionLeft) - (maxWidth - ulWidth)) + 'px'
			);
		}
		
	}).mouseleave(function(){
		jQuery(this).children('ul.level_2').hide();
	});
	
	jQuery('ul.level_3').children('li').mouseenter(function(){
		var color = jQuery(this).children('a').children('span.fva').children('span.fva_left').children('span.fva_house_color').css('background-color');
		jQuery(this).children('a').children('span.fva').children('span.fva_left').children('span.fva_house_title').css('color', color);
		jQuery(this).children('a').children('span.fva').children('span.fva_right').children('span.fva_nav_description').children('span.fva_nav_title').css('color', color);
	}).mouseleave(function(){
		jQuery(this).children('a').children('span.fva').children('span.fva_left').children('span.fva_house_title').css('color', '');
		jQuery(this).children('a').children('span.fva').children('span.fva_right').children('span.fva_nav_description').children('span.fva_nav_title').css('color', '');
	});
});
