﻿var isIdentified=false;

/**
Affichage des infos abonné
*/

/**
 JQuery document ready
*/

$(document).ready(function() {
	/*
	$.ez("restricted::connexion", {}, function(data){
		if(data.content)
			$("#bloc_connexion").html(data.content);
		else{
			$("#ctn_wait").hide();
			$("#ctn_anonymous").removeClass('hidden');
		}
	});
	*/
	/*
	$.ez("restricted::identified", {}, function(data){
		if(data.content){
			isIdentified = true;
		}
		else{
			isIdentified =  false;
		}
	});
	*/
	$.ez("restricted::promo", {}, function(data){
		if(data.content){// pas identifié, renvoie un bloc promo
			if ($("#BP_abo").length){
				$("#BP_abo").html(data.content);
			}
			else if ($("#BP_abo_une").length){
				$("#BP_abo_une").removeClass("hidden");
			}
		}
		else { // identifié
			isIdentified=true;
			$("#BP_abo").addClass("hidden");
			$("#BP_abo_une").addClass("hidden");
		}
	});

});

function logoutWait(){
	if($("#ctn_wait").length && $("#ctn_identified").length && $("#ctn_anonymous").length){
		$("#ctn_wait").removeClass("hidden");
		$("#ctn_identified").addClass("hidden");
		$("#ctn_anonymous").addClass("hidden");
	}
	return true;
}
/**
.init({
    // let's skip the automatic setup because we don't have any
    // properly configured link elements on the page
    skipSetup: false,
    overlayOpacity: 0.12,
    // include the html player because we want to display some html content
    players: ["html"]
});
*/
