END USER AGREEMENT: Purchasing this code gives you the rights to use it in your projects but not to redistribute it to others through cloneables or any other method of sharing the code. For a license to use this code in a template, please contact T.RICKS. This code is listed as is. No modifications or updates can be requested. However, if T.RICKS decides to make any future modifications or improvements to the code, you will be granted access. Purchasing this code is not in exchange for any support from T.RICKS in implementing it in your project or in exchange for any other personal service.

<script>
// © Code by T.RICKS, <https://www.tricksdesign.com/>
// Copyright 2020, T.RICKS, All rights reserved.
// You have the license to use this code in your projects but not to redistribute it to others

$( ".link" ).click(function(e) {
	var cmsCard = $('.cms-card');
  var cardWidth = cmsCard.outerWidth();
  var cardHeight = cmsCard.outerHeight();
  var cardTop = cmsCard.offset().top;
  var cardLeft = cmsCard.offset().left;
  var itemTop = $(this).offset().top;
  var itemLeft = $(this).offset().left;
  var topPo = cardTop - itemTop;
  var leftPo = cardLeft - itemLeft;
  $(this).css('height', cardHeight);
 	$(this).css('width', cardWidth);
  $('body').css('overflow', 'hidden');
  $(this).css('top', topPo);
  $(this).css('left', leftPo);
  $(this).css('zIndex', '10000');
  e.preventDefault();
  var moduleURL = jQuery(this).attr("href");
  setTimeout( function() { window.location = moduleURL }, 500 );
});

</script>