$(document).ready(function() {
	
	$('html').removeClass('js');
	
	/* homepage slider parameters */						   
	$('.home-slider').cycle({ 
	fx:     'fade', 
	speed:  2000, 
	timeout: 5000,
	pause: 1 
	});
	
	/* references slider parameters */						   
	$('.references-slider').cycle({ 
	fx:     'fade', 
	speed:  1000, 
	timeout: 3000,
	random:  1,
	pause: 1 
	});
	
	/* accueil slider parameters */		
	/*  ATTENTION, si on veut d'autres effets, il faut la version complète, sur le site http://jquery.malsup.com/cycle/download.html  */				   
	$('.accueil-slider').cycle({ 
	fx:     'fade', 
	speed:  1000, 
	timeout: 3000,
	random:  1,
	pause: 1 
	});

	/* entire block clickable for latest news */						   
	$(".ln-list li").click(function(){
    	window.location=$(this).find("a").attr("href");
		return false;
	});

	$(".ln-list li").mouseover(function(){
		$(this).addClass('ln-active');
		$(this).find("a").attr("class", "ln-link");
	 
    }).mouseout(function(){
	    $(this).removeClass('ln-active');
		$(this).find("a").attr("class", "");
    });
	
	
	/* entire block clickable for header contact box(present in all interior pages) */	
	$(".header-contact").click(function(){
    	window.location=$(this).find("a").attr("href");
		return false;
	});	
	
});



	
	
/***************************************************
	     SCROLL TO TOP JAVASCRIPT
***************************************************/	
jQuery(document).ready(function(){
    $('a[href=#wrapper]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
        && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 500);
                return false;
            }
        }
    });
});
