(function($) {

        $.fn.miniaYoutube = function(p) {

				var defaults = {
				};
				
				
				p = $.extend( defaults, p);
				//-----------
		
				var image1 = $(this).children("img")[0];
				var image2 = $(this).children("img")[1];
				var image3 = $(this).children("img")[2];
				var compteur = 1 ;
				var timer = null;
				
				$(image2).css("display", "none");
				$(image3).css("display", "none");
				
				$(this).mouseover(function(){
					
					if(timer == null){
						
						timer = window.setTimeout(function(){gestion_changemnt_minia();},250);
					}
				});
				
				$(this).mouseout(function(){
					if(timer != null){
						window.clearInterval(timer);
						timer = null;
					}
				});
				
				function gestion_changemnt_minia(){
					
						if(compteur > 3){
							compteur = 1;
						}
						
						for(var i = 1 ; i < 4 ; i++){
							if( i == compteur){
								$(eval("image"+i)).css("display","block");
							}else{
								$(eval("image"+i)).css("display","none");
							}
						}
						
						compteur++;	
						timer = window.setTimeout(function(){gestion_changemnt_minia();},250);
				}
				
        	return this;
        };
})(jQuery);



Array.prototype.clone = function () {var a = new Array(); for (var property in this) {a[property] = typeof (this[property]) == 'object' ? this[property].clone() : this[property]} return a}
