// starting the script on page load
$(document).ready(function() {
	$('#coin-slider').coinslider({
		width: 695,
		height: 280
	});
	$('a.screenshot').imgPreview({
		srcAttr: 'rel',
		containerID: 'imgPreviewWithStyles',
	    imgCSS: {
	        // Limit preview size:
	        height: 500
	    },
	    // When container is shown:
	    onShow: function(link){
	        // Animate link:
	        $(link).stop().animate({opacity:0.4});
	        // Reset image:
	        $('img', this).stop().css({opacity:0});
	    },
	    // 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});
	    }

	});
});
