﻿jQuery(document).ready(function()
{
	jQuery("#pageflip").hover(function()
	{ //On hover...
		jQuery("#pageflip img").stop()
		.animate({ //Animate and expand the image and the msg_block (Width + height)
			width: '500px',
			height: '550px'
		}, 500);
		jQuery(".msg_block").stop()
		.animate({ //Animate and expand the image and the msg_block (Width + height)
			width: '500px',
			height: '500px'
		}, 500);
	}, function()
	{
		jQuery("#pageflip img").stop() //On hover out, go back to original size 50x52
		.animate({
			width: '84px',
			height: '88px'
		}, 220);
		jQuery(".msg_block").stop() //On hover out, go back to original size 50x50
		.animate({
			width: '84px',
			height: '80px'
		}, 200, function()
		{
			var msgBlock = jQuery(".msg_block");

			msgBlock.css("background-image", "url("+msgBlock.attr("original")+")");
		}); //Note this one retracts a bit faster (to prevent glitching in IE)
	});
});

