		this.imagePreview = function(){	
			/* CONFIG */
				 
				xOffset = 90;
				yOffset = -300;
				
				// these 2 variable determine popup's distance from the cursor
				// you might want to adjust to get the right result
				
			/* END CONFIG */
			$("a.preview").hover(function(e){
				this.t = this.title;
				this.title = "";	
				var c = (this.t != "") ? "<br/>" + this.t : "";
				$("#preview").remove();
				$("#small-preview").remove();
				$("body").append("<p id='preview' style='position:absolute; border:3px solid #666;'><img src='"+ this.href +"' alt='Image preview' />"+ c +"</p>");	
				$("#preview").css("top",(e.pageY - xOffset) + "px").css("left",(e.pageX + yOffset) + "px").fadeIn("fast");					
		    },
			function(){
				this.title = this.t;	
				$("#preview").remove();
		    });	
			$("a.preview").mousemove(function(e){
				$("#preview").css("top",(e.pageY - xOffset) + "px").css("left",(e.pageX + yOffset) + "px");
			});	

			smallxOffset = 40; 
			smallyOffset = -150;
			
			$("a.small-preview").hover(function(e){
				this.t = this.title;
				this.title = "";	
				var c = (this.t != "") ? "<br/>" + this.t : "";
				$("#preview").remove();
				$("#small-preview").remove();
				$("body").append("<p id='small-preview' style='position:absolute; border:3px solid #666;'><img src='"+ this.href +"' alt='Image preview' />"+ c +"</p>");	
				$("#small-preview").css("top",(e.pageY - smallxOffset) + "px").css("left",(e.pageX + smallyOffset) + "px").fadeIn("fast");					
		    },
			function(){
				this.title = this.t;	
				$("#small-preview").remove();
		    });	
			$("a.small-preview").mousemove(function(e){
				$("#small-preview").css("top",(e.pageY - smallxOffset) + "px").css("left",(e.pageX + smallyOffset) + "px");
			});	
		};