jQuery.fn.linklook = function (opt) {
jQuery("a", this).each( function() {
jQuery(this).hover(
function() {
var pos = jQuery(this).position();
var height = jQuery(this).outerHeight();
var leftMargin = jQuery(this).outerWidth() / 2, 
topMargin = jQuery(this).outerHeight() / 2;
var loaded = false;
jQuery("<img>")
.hide()
.addClass("linklook")
.insertAfter(this)
.attr( { src: jQuery(this).attr("href") } )
.bind( "load", function(){ 
if (!loaded) {
loaded = true;
jQuery(this).fadeIn(800); 
}
})
.css({ 
position: "absolute", 
/*marginLeft: '-' +leftMargin +'px', marginTop: '-' +topMargin +'px',*/ 
zIndex: '1000', width: '500px', left: (pos.left + 100) + 'px', top: (pos.top - height) + 'px'
})
.bind("click", 
function(){
jQuery(this).next().filter("img").fadeOut(600, function() { jQuery(this).remove(); });
});
},
function() { 
jQuery(this).next().filter("img").fadeOut(600, function() { jQuery(this).remove(); });
}
);
});
}
function popupImage(url, name) {
var newWindow = window.open(url, name, 'width=700,height=600,resizable=yes,scrollbars=yes,directories=no,location=no,toolbar=no,status=yes,dependent=yes,menubar=no');
newWindow.focus();
}