var oldPicture = "";
$(document).ready(function() {
   $('.cntImageProducts').parent().css({
		width:"220px",
		height:"220px",
		display:"block",
		position:"relative",
       left:"-2px",
       top:"14px"
    
  })
  
   $('.cntImageProducts').each(function(intindex) {
   
   
   
   $(this).parent().mouseenter(function() {
  
    curentObj = this; 		

 	$("<img />").load(function () {
		$(this).hide();
		$(this).attr({
		width:"220",
		height:"220"
		})
		
		$(this).css({
		
		position:"absolute",
		top:0,
		left:0
		
		})
	    $(curentObj).prepend(this)
		
		$(this).fadeIn();
		
	
		
    })
    .error(function () {
      // notify the user that the image could not be loaded
    }).attr({ src: $(curentObj).children("img").attr("secondImg") })
	
   }).mouseleave(function() {
   
    if($(this).children('img').length > 1) {
	
		
		$(this).children('img:first').fadeOut('fast',function(){ 
					$(this).remove();
				});
		}
		
		
   })

	})
})
