/* ****************************************************

	@file         global.js
	@description  Comportements globaux
	@author       Luc-Olivier (ixmedia.com)

***************************************************** */

(function($) {

	$(function() {
		
		var background;
		var hauteurPage = $('html')[0].scrollHeight;
		$('div#colonneGauche').css('height',hauteurPage-185);
		$('div#wrap-contenu').css('height',hauteurPage-140);
		
		$('div.unProgramme a').hover(function(){
			$(this).find('img.cadre').show();
			$(this).find('span').css('text-decoration','none');
			$(this).css('color','#130705');
		}, function(){
			$(this).find('img.cadre').hide();
			$(this).find('span').css('text-decoration','underline');
			$(this).css('color','#675347');			
		});
		
		if($('body').is('.section-accueil')) 										{ background = new Classy.FullscreenBackground('./images/interface/contenu-bg-1.jpg',{width:1024,height:768}); }
		if($('body').is('.section-a-propos')) 										{ background = new Classy.FullscreenBackground('./images/interface/contenu-bg-1.jpg',{width:1024,height:768}); }
		if($('body').is('.section-equipes')) 										{ background = new Classy.FullscreenBackground('./images/interface/contenu-bg-1.jpg',{width:1024,height:768}); }
		if($('body').is('.section-partenaires')) 									{ background = new Classy.FullscreenBackground('./images/interface/contenu-bg-1.jpg',{width:1024,height:768}); }
		if($('body').is('.section-nous-joindre')) 									{ background = new Classy.FullscreenBackground('./images/interface/contenu-bg-1.jpg',{width:1024,height:768}); }
		if($('body').is('.section-inscriptions')) 									{ background = new Classy.FullscreenBackground('./images/interface/contenu-bg-1.jpg',{width:1024,height:768}); }
		if($('body').is('.section-services-aux-etudiants')) 						{ background = new Classy.FullscreenBackground('./images/interface/contenu-bg-1.jpg',{width:1024,height:768}); }
		if($('body').is('.section-services-aux-entreprises')) 						{ background = new Classy.FullscreenBackground('./images/interface/contenu-bg-1.jpg',{width:1024,height:768}); }
		if($('body').is('.section-statistiques-de-placement')) 						{ background = new Classy.FullscreenBackground('./images/interface/contenu-bg-1.jpg',{width:1024,height:768}); }
		
		if($('body').is('.listeProgramme')) 										{ background = new Classy.FullscreenBackground('./../images/les-programmes/fonds/contenu-bg-amenagement-ressources-fauniques.jpg',{width:1024,height:768}); }
		if($('body').is('.section-affutage')) 										{ background = new Classy.FullscreenBackground('./../images/les-programmes/fonds/contenu-bg-affutage.jpg',{width:1024,height:768}); }
		if($('body').is('.section-abattage-manuel-debardage-forestier')) 			{ background = new Classy.FullscreenBackground('./../images/les-programmes/fonds/contenu-bg-abattage.jpg',{width:1024,height:768}); }
		if($('body').is('.section-amenagement-foret')) 								{ background = new Classy.FullscreenBackground('./../images/les-programmes/fonds/contenu-bg-amenagement-foret.jpg',{width:1024,height:768}); }
		if($('body').is('.section-amenagement-ressources-fauniques-forestieres')) 	{ background = new Classy.FullscreenBackground('./../images/les-programmes/fonds/contenu-bg-amenagement-ressources-fauniques.jpg',{width:1024,height:768}); }
		if($('body').is('.section-classement-bois-debites')) 						{ background = new Classy.FullscreenBackground('./../images/les-programmes/fonds/contenu-bg-classement.jpg',{width:1024,height:768}); }
		if($('body').is('.section-protection-exploitation-territoires-fauniques')) 	{ background = new Classy.FullscreenBackground('./../images/les-programmes/fonds/contenu-bg-protection.jpg',{width:1024,height:768}); }
		if($('body').is('.section-sciage')) 										{ background = new Classy.FullscreenBackground('./../images/les-programmes/fonds/contenu-bg-sciage.jpg',{width:1024,height:768}); }
		if($('body').is('.section-travail-sylvicole')) 								{ background = new Classy.FullscreenBackground('./../images/les-programmes/fonds/contenu-bg-travail-sylvicole.jpg',{width:1024,height:768});  }
	
		$('p#haut-de-page a').click(function(e) {
			$('html, body').animate({scrollTop: '0px'}, 300);
			e.preventDefault();
			return false;
		});
	});

})(jQuery);

