this.screenshotPreview = 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.screenshot").hover(function(e){
                this.t = this.title;
                this.title = "";
                var c = (this.t != "") ? "<br/>" + this.t : "";
                $("body").append("<p class='screenshot-popup-image' id=\"screenshot\"><img src='"+ this.rel +"' alt='' />"+ c +"</p>");
                $(".screenshot-popup-image")
                        .css("top",(e.pageY - xOffset) + "px")
                        .css("left",(e.pageX + yOffset) + "px")
                        .fadeIn("fast");
    },
        function(){
                this.title = this.t;
                $(".screenshot-popup-image").remove();
    });
        $("a.screenshot").mousemove(function(e){
				var positionY = e.pageY + xOffset;
                var posVarY = window.scrollY + $(window).height() - $(".screenshot-popup-image").height();
                if (e.pageY > posVarY) {
                        positionY = posVarY - xOffset;
                }

//              console.log($(".screenshot-popup-image").height());
                $(".screenshot-popup-image")
                        .css("top",(positionY) + "px")
                        .css("left",(e.pageX + yOffset) + "px");
        });
};


// starting the script on page load




