var product = {
	/**
	* Metodo que troca o thumb
	* @param {Node} anchor
	*/
	changeThumb:function(anchor){
		var target, img, s, t;
		
		if(!anchor.__image){anchor.__image = compono.getByTagName("img",anchor.parentNode);}
		img = anchor.__image;
		
		if(!img.__thumb){img.__thumb = compono.getByClassName("img","photo",anchor.parentNode.parentNode.parentNode);}
		target = img.__thumb; 
		
		s = img.getAttribute("src");
		t = img.getAttribute("thumb");
		
		img.setAttribute("thumb", target.getAttribute("src"));
		
		img.setAttribute("src", target.getAttribute("thumb"));
		target.setAttribute("thumb", s);
		target.setAttribute("src", t);
		
		if(window.attachEvent){
			this.timeoutID = window.setTimeout(function(){
				target.setAttribute("src", target.getAttribute("src"));
				img.setAttribute("src", img.getAttribute("src"));
				window.clearTimeout(product.timeoutID);
			},10);			
		}
		
	},
	/**
	* Imagem transparente para resolver problemas do simbolo de imagem errado
	* Isso podera' ser portado para imagem em formato binario direto no src (URI 'data:')
	* Ou ser portado para 
	*/
	DEFAULT_IMAGE:"Theme/compono/img/empty.gif",
	/**
	* Me'todo que no onerror da imagem cria um outra imagem e tenta carrega'-la do server
	* se o retorno for o correto essa imagem e' passada para a __base.
	* se o retorno for erro o me'todo coloca um class na imagem __base.
	* @param {Node} i Imagem q executou o evento onerror.
	* @param {Event} e Evento erro.
	*/
	error:function(i,e){
		var c=" error";
		i.__img = new Image();
		i.__img.__base = i;
		i.__img.src = i.getAttribute("src");
		i.__img.onload = function(){
			this.__base.className = this.__base.className.replace(c,"");
			if(window.attachEvent)this.__base.setAttribute("src", "");
			this.__base.setAttribute("src", this.getAttribute("src"));
		}
		i.className+=c;
		i.setAttribute("src", product.DEFAULT_IMAGE)
		return true;
	}
	
};
