/*--------------------------------------------------------------
# Copyright (C) joomla-monster.com
# License: http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
# Website: http://www.joomla-monster.com
# Support: info@joomla-monster.com
---------------------------------------------------------------*/

//effects
function JMaddEffect(e) {
	var moduleTarget = jQuery(e).hasClass("animate-ms");
	if (moduleTarget) {
		var ojectPosition = jQuery(e).offset().top;
		var scrollWindow = jQuery(window).scrollTop();
		var screenHeight = jQuery(window).height();
		if (ojectPosition < (scrollWindow + screenHeight)) {
			jQuery(e).addClass("jm-slideIn");
		}
	}
};

jQuery(window).load(function() {
  JMaddEffect('.promo1-ms');
	JMaddEffect('.promo2-ms');
	JMaddEffect('.promo3-ms');
});

jQuery(window).scroll(function() {
	JMaddEffect('.promo1-ms');
	JMaddEffect('.promo2-ms');
	JMaddEffect('.promo3-ms');
});