this.image_preview = function() {
   yOffset = 30;
   xOffset = 10;
   nPercent = 80;
   
   $("a.image_preview").hover(function(e) {
      if ($("#image_preview").length > 0)
         $("#image_preview").remove();
   
      var url = $(this).attr('ref');
      var image = new Image();

      $(this).attr('title', '');
      var xOff = e.pageY - xOffset;
      if (xOff < 0) xOff = 0;
      
      $(image).bind("load", function () {
      
         width = $(this).attr('width');
         height = $(this).attr('height');
         
         width *= (nPercent / 100);
         height *= (nPercent / 100);
         
         $("body").append("<div id='image_preview'><img src='"+ $(this).attr('src') +"' width='"+width+"px' height='"+height+"px' alt='' /></div>");
         $("#image_preview")
         .css("top",(xOff) + "px")
         .css("left",(e.pageX + yOffset) + "px");
         
         $("#image_preview").fadeIn("slow");
      });
      
      image.src = url;
   },
   function() {
      $("#image_preview").remove();
   });
   
   $("a.image_preview").mousemove(function(e) {
      var xOff = e.pageY - xOffset;
      if (xOff < 0) xOff = 0;
      
      $("#image_preview")
      .css("top",(xOff) + "px")
      .css("left",(e.pageX + yOffset) + "px");
   });			
};

