var widthIphone = $(window).width();

if (widthIphone < 361) {
	
}

else {	
$(function () {
 
	 var msie6 = $.browser == 'msie' && $.browser.version < 7;

	 if (!msie6) {
	   var top = $('#hauteur_top').offset().top - parseFloat($('#hauteur_top').css('margin-top').replace(/auto/, 0));
	   $(window).scroll(function (event) {
	     // what the y position of the scroll is
	     var y = $(this).scrollTop();

	     // whether that's below the form
	     if (y >= top) {
	       // if so, ad the fixed class
	//        $('#content_right').addClass('fixed');
		$('#hauteur_top').css('top', y).delay(1000);
	     } else {
	       // otherwise remove it
	//        $('#content_right').removeClass('fixed');
	     }
	   });
 	}
 	 
/*$('a[href^=#]').click(function() {
	cible = $(this).attr('href');
	if($(cible).length=1){
	    hauteur=$(cible).offset().top;
        }
	else{
	    hauteur=$("a[name="+cible.substr(1,cible.length-1)+"]").offset().top;
	}
	$('body').animate({scrollTop: hauteur}, 3000);
 
	return false;
});*/


function juizScrollTo(element){  
    $(element).click(function(){
	if (!$(this).hasClass('actif')){
	$('.logo_menu').hide();
	$('.menu ul li a').removeClass('actif');
	$(this).addClass('actif');
        var goscroll = false;  
        var the_hash = $(this).attr("href");  
        var regex = new RegExp("\#(.*)","gi");  
        if(the_hash.match("\#")) {  
            the_hash = the_hash.replace(regex,"$1");  
            if($("#"+the_hash).length>0) {  
                the_hash = "#" + the_hash;  
                goscroll = true;
				//$('.logo_menu').show();  
            }  
            else if($("a[name=" + hash + "]").length>0) {  
                the_hash = "a[name=" + the_hash + "]";  
                goscroll = true; 
				//$('.logo_menu').show(); 
            }  
            if(goscroll) {  
                $('html, body').animate({  
                    scrollTop:$(the_hash).offset().top  
                }, 3000, function () {
					/*$('.logo_menu').show(); */
					$('.logo_menu').fadeIn(1000); 
				});  
                return false;  
            }  
        } 
	} else return false;  
    });  
};  
juizScrollTo('#navigation a[href^="#"]'); 

});


}
$(document).keypress(function(e) {
    e.preventDefault();
});
