$(document).ready(function() {

	// e-Card (PREVIEW CARD)

	$('.tx-srsendcard-pi1 .preview').each(function() {
		$(this).css({height: '430px'});
	});
	
	$('.tx-srsendcard-pi1 .preview .image-wrap').each(function() {
		$(this).css({position: 'absolute', top: '0', left: '0', display: 'none'}).hide(0);
	});
	
	$('.tx-srsendcard-pi1 .preview .message-wrap').each(function() {
		$(this).css({position: 'absolute', top: '0', left: '0', display: 'block'});
	});
	
	$('.tx-srsendcard-pi1 .preview .flip').each(function() {
		$(this).css({display: 'block'});
	});
	
	$('.tx-srsendcard-pi1 .preview .flip').click(function() {
		if($('.tx-srsendcard-pi1 .preview .image-wrap').css('display') == 'block') {
			$('.tx-srsendcard-pi1 .preview .image-wrap').hide(0);
			$('.tx-srsendcard-pi1 .preview .message-wrap').show(0);
		}else {
			$('.tx-srsendcard-pi1 .preview .image-wrap').show(0);
			$('.tx-srsendcard-pi1 .preview .message-wrap').hide(0);
		}
		return false;
	});
	
	
	// e-Card (VIEW CARD)

	$('.tx-srsendcard-pi1 .viewcard').each(function() {
		$(this).css({height: '430px'});
	});
	
	$('.tx-srsendcard-pi1 .viewcard .image-wrap').each(function() {
		$(this).css({position: 'absolute', top: '0', left: '0', display: 'block'});
	});
	
	$('.tx-srsendcard-pi1 .viewcard .message-wrap').each(function() {
		$(this).css({position: 'absolute', top: '0', left: '0', display: 'none'}).hide(0);
	});
	
	$('.tx-srsendcard-pi1 .viewcard .flip').each(function() {
		$(this).css({display: 'block'});
	});
	
	$('.tx-srsendcard-pi1 .viewcard .flip').click(function() {
		if($('.tx-srsendcard-pi1 .viewcard .image-wrap').css('display') == 'block') {
			$('.tx-srsendcard-pi1 .viewcard .image-wrap').hide(0);
			$('.tx-srsendcard-pi1 .viewcard .message-wrap').show(0);
		}else {
			$('.tx-srsendcard-pi1 .viewcard .image-wrap').show(0);
			$('.tx-srsendcard-pi1 .viewcard .message-wrap').hide(0);
		}
		return false;
	});
});
