$(document).ready(function(){
	$('.showTPL1').imgPreview({
	    containerID: 'imgPreviewWithStyles',
	    imgCSS: {
	        height: 200
	    },
	
	    onShow: function(link){
	        // Animate link:
	        $(link).stop().animate({opacity:0.4});
	        // Reset image:
	//        $('img', this).stop().css({opacity:0});
	        $('<span>' + link.title + '</span>').appendTo(this);
	
	    },
	    // When image has loaded:
	    onLoad: function(){
	        // Animate image
	        $(this).animate({opacity:1}, 300);
	    },
	    // When container hides: 
	    onHide: function(link){
	        // Animate link:
	        $(link).stop().animate({opacity:1});
	        $('span', this).remove();
	    }
	});
});
