this.imagePreview = function(){	

	jQuery("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";
		var imgURL = jQuery(this).attr('rel') || this.href;
		var c = (this.t != "") ? "<br/>" + this.t : "";
		
		jQuery("#umb").css("position", "relative");
		jQuery(this).attr("href", "javascript:void();");
		//alert(jQuery(this).children().height());
		c = '';
		
		jQuery("#umb").append("<p id='preview'><img src='" + imgURL + "' alt='Image preview' />" + c + "</p>");
		
		if (jQuery(this).attr("class") == "preview right") {
			//alert(jQuery(this).attr("class"));
			jQuery("#preview")
				//.css("top", "-" + jQuery(this).children().height() + "px")
				.css("top", "0px")
				.css("left", '0px')
				.css("z-index", "1000")
				.show();
		} else {
			//alert(jQuery(this).attr("class"));
			jQuery("#preview")
				//.css("top", "-" + jQuery(this).children().height() + "px")
				.css("top", "0px")
				.css("right", '0px')
				.css("z-index", "1000")
				.show();
		}
    },
	function(){
		this.title = this.t;			
		jQuery("#preview").remove();
    });	
};

jQuery(document).ready(function(){
	imagePreview();
});
