this.screenshotPreview = function(){   
        /* CONFIG */
               var de = document.documentElement;
			   var w = self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
			   var h = self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
			   //alert(w);
                xOffset = 30;
                yOffset = 10;
                wBulle = 366;
				hBulle = 178;
                // these 2 variable determine popup's distance from the cursor
                // you might want to adjust to get the right result
               
        /* END CONFIG */
        $("a.screenshot").hover(function(e){
										 	
				oLeft = e.pageX + xOffset;
				oTop = e.pageY - yOffset;
				if(oLeft + wBulle>w){
					oLeft = e.pageX - xOffset - wBulle;
				}
				if(oTop + hBulle>h){
					oTop = e.pageY - yOffset - hBulle;
				}
				
                this.t = this.title;
				$(this).attr("title", "");
				$(this).attr("alt", "");
                var c = (this.t != "") ? "<br/>" + this.t : "";
                $("body").append("<div id='screenshot'><img class='thumb150' src='"+ this.rel +"' alt='url preview' />"+ c +"</div>");                                                                
                $("#screenshot")
                        .css("top",(oTop) + "px")
                        .css("left",(oLeft) + "px")
                        .fadeIn("fast");                                               
    },
        function(){
                this.title = this.t;   
                $("#screenshot").remove();
    }); 
        $("a.screenshot").mousemove(function(e){
				
				var w = self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
				var h = self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;						 	
				oLeft = e.pageX + xOffset;
				oTop = e.pageY - yOffset;
				if(oLeft + wBulle>w){
					oLeft = e.pageX - xOffset - wBulle;
				}
				if(oTop + hBulle>h){
					oTop = e.pageY - yOffset - hBulle;
				}
                $("#screenshot")
                        .css("top",(oTop) + "px")
                        .css("left",(oLeft) + "px");
        }); 
		$("a.screenshot").click(function(){
						window.location = this.href;
		});
};
this.imagePreview = function(){ 
        /* CONFIG */
               
                xOffset = 10;
                yOffset = 30;
               
                // 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 : "";
                $("body").append("<p id='preview'><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");
        });                    
};
this.tooltip = function(){     
        /* CONFIG */           
                xOffset = 0;
                yOffset = 5;          
                // these 2 variable determine popup's distance from the cursor
                // you might want to adjust to get the right result            
        /* END CONFIG */               
        $("a.tooltip").hover(function(e){                                                                                        
                this.t = this.title;
                this.title = "";                                                                         
                $("body").append("<p id='tooltip'>"+ this.t +"</p>");
                $("#tooltip")
                        .css("top",(e.pageY - yOffset) + "px")
                        .css("left",(e.pageX + xOffset) + "px")
                        .fadeIn("fast");               
    },
        function(){
                this.title = this.t;           
                $("#tooltip").remove();
    }); 
        $("a.tooltip").mousemove(function(e){
                $("#tooltip")
                        .css("top",(e.pageY - yOffset) + "px")
                        .css("left",(e.pageX + xOffset) + "px");
        });    
		$("a.tooltip").click(function(){
						window.location = this.href;
		});                
};