$(document).ready(function(){
	tooltip2();
	$("#pageflip").hover(function() { //On hover...
	$("#pageflip img , .msg_block").stop()
		.animate({ //Animate and expand the image and the msg_block (Width + height)
			width: '307px',
			height: '319px'
		}, 500);
	} , function() {
	$("#pageflip img").stop() //On hover out, go back to original size 50x52
		.animate({
			width: '50px',
			height: '52px'
		}, 220);
	$(".msg_block").stop() //On hover out, go back to original size 50x50
		.animate({
			width: '50px',
			height: '50px'
		}, 200); //Note this one retracts a bit faster (to prevent glitching in IE)
});


 });



function clicked(un, deux){
	if($("#cont_desc > div." + deux).length == 0 && deux !="0"){
		$(".cache").show();
	}else{
		$(".cache").hide();
	}
	$(".prev_rech" ).show();
	$(".prev_rech:not(." + deux + ")").hide();
	$("#bas_desc").html("<h6>Recherche : "+ un +"</h6>");
	if(deux == "0"){
		$(".prev_rech" ).show();
	}
	return false;
}


tooltip2 = function() {
	var tool = $(".image_aide");
	for (var i=0; i<tool.length; i++) { 
		$(tool[i]).qtip({
   			content: {
         		text: false // Use each elements title attribute
      		},
			style: { 
			 	border: {
        			width: 0.5,
        			radius: 1,
         			color: '#292929'
      			},
      			name: 'dark',

				'font-size': 12,
				'font-family': "Arial, Helvetica, sans-serif",
				'color': "#ffffff",
				'background-color': "#101010",
				'background' : 'url(fond_rep_tip.jpg) repeat-x',
				tip: 'leftMiddle' 
   			},
			position: {
      			corner: {
         			target: 'rightMiddle',
         			tooltip: 'leftMiddle'
     			 }
  			},
   			show: 'mouseover',
   			hide: 'mouseout',
			effect:{ type:"shake"}
		})
	}
	
}