// JavaScript Document
var Galeria=function(obj){
	this.preload="vacio";
	this.data=obj;
	this.init=-1;
	this.next=function(){
	    
		if(this.data.imgs[this.init+1]!=undefined){
			this.init++;
			$('#marco_'+this.data.nombre+' img.frame').attr('src', this.data.imgs[this.init]);
		}
		else{
			this.init=-1;
			this.next();
		}
    /*.load(function(){
        $('.profile').append( $(this) );
        // Your other custom code
    });*/
	}
	this.prev=function(){
		if(this.init>=1){
			this.init--;
			$('#marco_'+this.data.nombre+' img.frame').attr('src', this.data.imgs[this.init]);
		}
		else{
			/*var cant=-1;
			for(ID in this.imgs){
				cant++;
			}
			this.init=cant;
			this.prev();*/
		}
	}
}