$(document).ready(function() {
/*$.post("headline_audio.php", {}, function(data){ $("#right-col").html(data); });
$.post("headline_recents.php", {}, function(data){ $("#cont-col-bottom").html(data); });
	*/

//putLoggedMenu();
setBinding(); 
/*HISTORY GENERAL*/
$.history.init(callback); $("a[rel='history']").click(function(){ $.history.load(this.href.replace(/^.*#/, '')); return false; });
//$("#connectBut").hover( function (){ $(this).attr('src', "./images/2/connect_button_over.png"); }, function (){	$(this).attr('src', "./images/2/connect_button.png") }); 

});

function setBinding(){
	
//bindClick("#logout", "login.php", {logout:"now"});
bindClick("#Articles", "articles.php", {});
bindClick("#ArticlesPodcasts", "artciles.podcasts.php", {});
bindClick("#accounts", "accounts.php", {});
bindClick("#pages", "./mod/site.php", {});
bindClick("#billing", "./mod/adm.billing.php", {});
bindClick("#paper", "paper.php", {});
bindClick("#groups", "./mod/groups.php", {});
bindClick("#corpos", "./mod/adm.corpo.php", {});
bindClick("#Projects", "lawProjects.php",  {});
//bindClick("#news", "lastnews.php",  {inline:'y'});
/*
bindClick("#decrets", "reader.php", {type:'d'});
bindClick("#flash", "reader.php", {type:'f'});
bindClick("#radio", "reader.php", {type:'r'});
bindClick("#newsList", "reader.php", {type:'er'});*/
bindClick("#logoRadioLink", "reader.php", {type:'r'});
//bindClick("#lrdl", "lawProjectsIndex.php", {});
bindClick("#Journaux", "papers.php", {});
bindClick("#spooler", "spooler.php", {});
bindClick("#podcast", "podcasts.php", {});
bindClick("#search", "search.php", {});
bindClick("#Etat", "addEtatExplique.php", {});
bindClick("#qsts", "addQuisontils.php", {});
//bindClick("#free", "reader.free.php", {type:'f'});
/*
$("[t='pcm']").bind("click", function(){
	$.post("reader.free.php", {i:$(this).attr('i')}, function(data){ if($("#mainContent").css('display') == 'none'){ $("#homeContent").css('display', 'none'); $("#mainContent").css('display', 'block');} $("#cont-col").html(data); }); 
	}); */
	
	}
function callback(){}
function clearLPW(){ $("#loadingPleaseWait").css("display", "none"); }
function showLPW(ActionStr){
 $("#actionStr").html(ActionStr); $("#loadingPleaseWait").css("display", "block");
$("#closeLPW").bind("click", function (event){ event.stopPropagation();	$("#loadingPleaseWait").css("display", "none");	});}
function message(text, elem){ 
	if(!elem)
		elem = "#messageBox";
	$(elem).html(text); 
	$(elem).show('slow'); 
	setTimeout("$('"+elem+"').hide('slow')", 3000); 
	
	}
