/**
 * @author danve
 */



function enableThumbZoom(cssclass)
{
	var id;
	$("."+cssclass).mouseover(function(){
		//append larg image to body	
		var img = "<img id='large_"+ $(this).attr('id') +"' src = '" + $(this).attr('image') + "' />";
		id = "large_"+ $(this).attr('id');

		$('body').append(img);		
	});
	
	//remove images
	$("."+cssclass).mouseout(function(){
		//$("body").remove($("#"+id));
		($("#"+id)).remove();
	});
	
	$("."+cssclass).mousemove(function(e){
		var img_height = $("#"+id).height();
		var top;
		if( (e.pageY + img_height) > $(window).height() )
			top = e.pageY - img_height;
		else
			top = e.pageY + 10;
		//console.log($(window).height());
		
		$("#"+id).css('position','absolute');
		$("#"+id).css('border','solid 1px #FFFFFF');
		$("#"+id).css('top',top);
		$("#"+id).css('left',e.pageX+10);

	});
}
