			var current = 0;
			var howmany=5;
			var ancho=700;
			$(document).ready(function(){
			
				$("a#prev").click(function(){ //next
					current = current + 1;
					
					if(current != howmany){
					    $("#wrapperGaleria").animate({
					        marginLeft: "-="+ancho+"px"
					    }, 1000);
					    
					} else {
						current = current - 1;
					}
				});
				
				$("a#next").click(function(){
					current = current - 1;
				
					if(current > -1){
					    $("#wrapperGaleria").animate({
					        marginLeft: "+="+ancho+"px"
					    }, 1000);
					    
					} else {
						current = current + 1;
					}
				});
				
				$("a.num_img").click(function(){
					current=$(this).html()-1;
					
					var margen=current*ancho;
						$("#wrapperGaleria").animate({
					        marginLeft: "-" + margen + "px"
					    }, 1000);
				});
				
				
				$("#contenedorGaleria").everyTime(15000,function(i) {
					//$(this).html("timer: " + i);
					if(current <= howmany){
					    $("#wrapperGaleria").animate({
					        marginLeft: "-="+ancho+"px"
					    }, 1000);
						current = current + 1;
					    
					} else {
						var margen=current*ancho;
						$("#wrapperGaleria").animate({
					        marginLeft: "0px"
					    }, 1000);
						current = 0;
					}
				});
				
			});

