jQuery.noConflict();
jQuery(document).ready(function(){


	jQuery("ul.reseaux li").hover(function() { //On hover...
		
		var thumbOver = jQuery(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		jQuery(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});

		//Animate the image to 0 opacity (fade it out)
		jQuery(this).find("span").stop().fadeTo('normal', 0 , function() {
			jQuery(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
		jQuery(this).find("span").stop().fadeTo('normal', 1).show();
	});
	
	
		jQuery("ul.fotos").css({ opacity: 0.5 });
		
		jQuery("ul.fotos li").hover(function() { //On hover...

		var thumbOver = jQuery(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		jQuery(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
		

		//Animate the image to 0 opacity (fade it out)
		jQuery(this).find("span").stop().fadeTo('normal', 0 , function() {
			jQuery(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
		jQuery(this).find("span").stop().fadeTo('normal', 1).show();
	});
			
			
jQuery(".menu").jMenu({
      ulWidth : 120,
      effects : {
        effectSpeedOpen : 300,
        effectSpeedClose : 300,
        effectTypeOpen : 'slide',
        effectTypeClose : 'slide',
        effectOpen : 'linear',
        effectClose : 'linear'
      },
      LatenceTime : 400,
      animatedText : false,
      paddingLeft: 100
    });

/*SCROLLBAR*/
//jQuery("#textes").scrollbar();

//jQuery('#scrollbar1').tinyscrollbar();



/*jQuery("a").mouseenter(function(){
    jQuery(this).animate({color: "#4642dc"}, 500);
});
            
jQuery("a").mouseleave(function(){
	jQuery(this).animate({color: "#ffffff"}, 500);
});*/

        jQuery('#partagerSite img').each(function() {
            jQuery(this).hover(function() {
                jQuery(this).stop().animate({ opacity: 1.0 }, 500);
            },
           function() {
               jQuery(this).stop().animate({ opacity: 0.5 }, 500);
           });
        });		
		
		
		
jQuery("#footophon a").mouseenter(function(){
    jQuery(this).animate({color: "#1aa0a6"}, 500);
});
            
jQuery("#footophon a").mouseleave(function(){
	jQuery(this).animate({color: "#ffffff"}, 500);
});

jQuery("#archivesPos a").mouseenter(function(){
    jQuery(this).animate({color: "#1aa0a6"}, 500);
});
            
jQuery("#archivesPos a").mouseleave(function(){
	jQuery(this).animate({color: "#ffffff"}, 500);
});

jQuery("#derniersajoutsPos a").mouseenter(function(){
    jQuery(this).animate({color: "#1aa0a6"}, 500);
});
            
jQuery("#derniersajoutsPos a").mouseleave(function(){
	jQuery(this).animate({color: "#ffffff"}, 500);
});


jQuery(".editButton a").mouseenter(function(){
    jQuery(this).animate({color: "#1aa0a6"}, 500);
});
            
jQuery(".editButton a").mouseleave(function(){
	jQuery(this).animate({color: "#ffffff"}, 500);
});



jQuery(".menu li a").mouseenter(function(){
    jQuery(this).animate({color: "#1aa0a6"}, 500);
});
            
jQuery(".menu li a").mouseleave(function(){
	jQuery(this).animate({color: "#ffffff"}, 500);
});

		
jQuery("h2 a").mouseenter(function(){
    jQuery(this).animate({color: "#f0eba8"}, 500);
});
            
jQuery("h2 a").mouseleave(function(){
	jQuery(this).animate({color: "#1aa0a6"}, 500);
});

jQuery("#date-et-pdf a").mouseenter(function(){
    jQuery(this).animate({color: "#1aa0a6"}, 500);
});
            
jQuery("#date-et-pdf a").mouseleave(function(){
	jQuery(this).animate({color: "#ffffff"}, 500);
});


jQuery(".nav-next a").mouseenter(function(){
    jQuery(this).animate({color: "#f0eba8"}, 500);
});
            
jQuery(".nav-next a").mouseleave(function(){
	jQuery(this).animate({color: "#ffffff"}, 500);
});

jQuery(".nav-previous a").mouseenter(function(){
    jQuery(this).animate({color: "#f0eba8"}, 500);
});
            
jQuery(".nav-previous a").mouseleave(function(){
	jQuery(this).animate({color: "#ffffff"}, 500);
});

//jQuery("img.transImage").css({ opacity: 0.5 });

jQuery.fn.cross = function (options) {
            return this.each(function (i) { 
                // cache the copy of jQuery(this) - the start image
                var $$ = jQuery(this);
                
                // get the target from the backgroundImage + regexp
                var target = $$.css('backgroundImage').replace(/^url|[\(\)'"]/g, '');

                // nice long chain: wrap img element in span
                $$.wrap('<span style="position: relative;"></span>')
                    // change selector to parent - i.e. newly created span
                    .parent()
                    // prepend a new image inside the span
                    .prepend('<img>')
                    // change the selector to the newly created image
                    .find(':first-child')
                    // set the image to the target
                    .attr('src', target);


                if (jQuery.browser.msie || jQuery.browser.mozilla) {
                    $$.css({
                        'position' : 'absolute', 
                        'left' : 0,
                        'background' : '',
                        'top' : this.offsetTop
                    });
                } else if (jQuery.browser.opera && jQuery.browser.version < 9.5) {
                 
                    $$.css({
                        'position' : 'absolute', 
                        'left' : 0,
                        'background' : '',
                        'top' : "0"
                    });
                } else { // Safari
                    $$.css({
                        'position' : 'absolute', 
                        'left' : 0,
                        'background' : ''
                    });
                }

                $$.hover(function () {
                    $$.stop().animate({
                        opacity: 0
                    }, 250);
                }, function () {
                    $$.stop().animate({
                        opacity: 1
                    }, 250);
                });
            });
        };
		
		
	jQuery(window).bind('load', function () {
        jQuery('img.transImage').cross();
    });


 // initFadeInOut

/*MASQUE / AFFICHE LE TEXTE*/
    //jQuery("#boutonMasquerTexte").click(function () {
		
	//$("#contenu").fadeOut(500, function (){$("#vertical_slide_bis").slideToggle("slow");});
	//jQuery("#conteneurTexte").slideToggle("slow");
    
	//});
	
	
	/*jQuery("#boutonMasquerTexte").click(function () {
		if (jQuery("#conteneurTexte").is(":hidden")) {
			 jQuery("#conteneurTexte").fadeIn();
		}else {
			jQuery("#conteneurTexte").fadeOut();
		}
		
		if (jQuery("#conteneurTexteCadre").is(":hidden")) {
			 jQuery("#conteneurTexteCadre").fadeIn();
		}else {
			jQuery("#conteneurTexteCadre").fadeOut();
		}
	});*/
	

/*MASQUE / AFFICHE LES CONTROLE DU DIAPO*/
//    jQuery("#boutonMasquerControl").click(function () {
		
		//$("#contenu").fadeOut(500, function (){$("#vertical_slide_bis").slideToggle("slow");});
//      jQuery("#controles").slideToggle("slow");
//    });
	
});
