
	Event.observe(window, 'load', initIframePopins, false);

	function initIframePopins()
	{
	
		var IframePopin_btnClose = '<div class="btn_close"><a href="#" class="lbAction" id="btnCloseIframePopin">Fermer</a></div>';
		var popins_links = $$('.iframePopinLink');
		
		//Event.stopObserving( $$('.iframePopinLink'),"click",this)

		$("iframePopinAction").insert(IframePopin_btnClose);
			popins_links.each(function(link){
			Event.observe(link,'click', openIframePopin);
		});
	}
	
	function openIframePopin(event){	
	
		event.stop();
		
	

		var link = this.href;
		var iframe = '<iframe id="lightboxIframe" frameborder="0" style="border:0; width: 816px; height: 466px;" src="'+link+'"></iframe>';

		$("iframePopinElement").insert(iframe);
		
		$("iframePopin").style.display = "block";
		$("overlay").style.display = "block";

		
		Event.observe($("btnCloseIframePopin"),'click', closeIframePopin);
		
	}
	
	function closeIframePopin(event){
		
		 event.stop();

		$("iframePopinElement").firstDescendant().remove();
		
		$("iframePopin").style.display = "none";
		$("overlay").style.display = "none";

		
		return false;
	}
