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=navigationMap]').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(){
			var $btnPopup = $(this).find('[data-sg-id=btn-popup]');
			$btnPopup.click();
		};

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