var initList = initList || []; 

initList.push(function(){
	requirejs(['jquery', 'sgZoom'],  function($,sgZoom) {
		sgZoom.targetEventN = false;

		sgZoom.initFunction = function(){
			$('[data-sg-id=elem-zoom][data-sg-type=timeLife]').each(function(e,i){
				var $container = $(this).find('[data-sg-id=zoom-screen]');

				var $btnPopup = $container.find('[data-sg-id=btn-popup]');
				if($(this).is(':visible'))
					$btnPopup.click();
			});
		};

		sgZoom.targetEvent = function(){
		};

		//Update and apply functions
		sgZoom.updateZoom();

		//Include css file relative with this module extension.
        $("head").append($("<link rel='stylesheet' href='../../common/css/modulesExtension/sgZoomTimeLife.css' type='text/css' media='screen' />"));
	});
});