
Commentaires= new function(){
function commentairePosted(data){
$j("#b-soumettre").show();
if(data=="OK"){
$j("#frmCommentaire ol").hide();
$j("#frmCommentaire p").show();
setTimeout(function(){
$j("#frmCommentaire ol").show();
$j("#frmCommentaire p").hide();
$j("#frmCommentaire :input").val("");
$j("#frmCommentaire :checkbox").attr('checked', false)}, 30*1000);} else{
$j.each(data, function(i, n){
jQuery("#"+n[0]).tooltip(n[3]);});}}
this.soumettre= function(){
var url="/plugin.php";
var f= $w("frmCommentaire");
var v= formToJSON(f);
v.plugin="commentaire";
v.action="soumettre_commentaire";
$j("#b-soumettre").hide();
$j.clearTooltips();
$j.post(url, v, commentairePosted,"json" );}}
$j(document).ready(function(){
$j('#main-body').animate({
backgroundPosition:"("+bgYPos+")"}, 800,"easeOutBack" , function(){
if($j.support.opacity){
$j('#container').css({opacity: 0, display:'block'});
var cssPos=-25;
$j('#liste-onglets li').each(function(i){
$j(this).css({'left': cssPos+"px"});
cssPos+= $j(this).width();});
$j('head').append('<style type="text/css">#menu-onglet .selected a {padding: 0 19px 12px 18px;} #menu-onglet .selected a .box {padding: 16px 29px 12px 28px;}</style>');
$j('#container').animate({opacity: 1}, 400);} else{
$j('#container').css({display:'block'});
var cssPos=-25;
$j('#liste-onglets li').each(function(i){
$j(this).css({'left': cssPos+"px"});
cssPos+= $j(this).width();});
$j('head').append('<style type="text/css">#menu-onglet .selected a {padding: 0 19px 12px 18px;} #menu-onglet .selected a .box {padding: 16px 31px 12px 30px;}</style>');}}
);});