$(function($){  
    
	$('ul#preview a').imgPreview({
	    containerID: 'imgPreviewWithStyles',
	    srcAttr: 'rel',
	    imgCSS: {
	        // Limit preview size:
	        height: 150
	    },
	    preloadImages: true,
	    distanceFromCursor: {
			top:-195,left:-255
		},
		
		
	    // When container is shown:
	    onShow: function(link){
	        // Animate link:
	        //$(link).stop().animate({opacity:0.4});
		
	        // Reset image:
	        $('img', this).css({opacity:0});
	    },
				    
	    // When image has loaded:
	    onLoad: function(){
	        // Animate image
	        $(this).animate({opacity:1}, 200);
	    },
	    // When container hides: 
	    onHide: function(link){
	        // Animate link:
	        $(link).stop().animate({opacity:1});
	    }
	});

});
