$(document).ready(function(){
	
	
	// menu header
	$('#menu a').hover(function(){
		
		$(this).addClass('selected');
		
		if( $(this).attr('id') == 'menu2' ){
			
			$('#subMenu').show('fast');
			
		} else if ( $(this).attr('id') == 'menu1' || $(this).attr('id') == 'menu3' ) {
			
			$('#subMenu').hide('fast');
		}
		
	}, function(){
		
		$(this).removeClass('selected');
	});
	
	
	// submenu close
	$('#subMenu').hover(function(){}, function(){
		
		$(this).hide('fast');
	});
	
	
	// left menu
	$('#menuLeft a').hover(function(){
		
		$(this).addClass('selected');
		$(this).parent().addClass('selected');
		
	}, function(){
		
		$(this).removeClass('selected');
		$(this).parent().removeClass('selected');
	});
	
	
		
	// fix the left column height/background
	if( $('#rightColumn').css('height') ) {
		
		var rightColumnHeight = $('#rightColumn').height() + 80;
	}
	else if( $('#rightColumnInner').css('height') ){
		
		var rightColumnHeight = $('#rightColumnInner').height() + 80;
	}
	

	if(  rightColumnHeight > $('#leftColumn').height() ){
		
		$('#leftColumn').height( rightColumnHeight + 75 );
	}

	if( $('#mainBtmRight').css('height') ) {
		
		var rightColumnHeight = $('#mainBtmRight').height() + 25;
		$('#mainBtmLeft').height( $('#mainBtmRight').height() + 18 );
	}
	
	
	// image gallery hover effect
	$('ul.imagesGallery img').each(function() {
            $(this).hover(function() {
                $(this).stop().animate({ opacity: 1.0 }, 10);
            },
           function() {
               $(this).stop().animate({ opacity: 0.7 }, 600);
           });
        });

});




/**
* Load the menu hover images
*/

Image1= new Image(96,16);
Image1.src = "images/btn_le_bureal_hov.jpg";

Image2= new Image(164,17);
Image2.src = "images/btn_nos_realisations_hov.jpg";

Image3= new Image(83,17);
Image3.src = "images/btn_contact_hov.jpg";

Image4= new Image(164,12);
Image4.src = "images/btn_maisons_hov.jpg";

Image5= new Image(133,12);
Image5.src = "images/btn_transformations_hov.jpg";

Image6= new Image(69,12);
Image6.src = "images/btn_appartements_hov.jpg";

Image7= new Image(79,12);
Image7.src = "images/btn_interieurs_hov.jpg";

Image8= new Image(162,12);
Image8.src = "images/btn_left_maisons_hov.jpg";

Image9= new Image(131,12);
Image9.src = "images/btn_left_transformations_hov.jpg";

Image10= new Image(106,12);
Image10.src = "images/btn_left_appartements_hov.jpg";

Image11= new Image(77,12);
Image11.src = "images/btn_left_interieurs_hov.jpg";

