

/*
 * Projet DDC2
 */
tact = 0;
redir = 1;
tempo = 0;
minit_page = 1;

function slideSwitch() {
  if (tact == 0)
  {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    var $next = $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 2400, function() {
            $active.removeClass('active last-active');
        });
  }
  tact++; if (tact == 2) { tact = 0; }
}

function NextPage() {
  if (redir == 1 && tempo == 0)
  {
    if ($('#next-img').length) { window.location.href = $('#next-img').attr('href'); }
    else if ($('#a-next').length) { window.location.href = $('#a-next').attr('href'); }
    else { window.location.href = '/'; }
  }
  if (tempo > 0) tempo--;
}

function ClipHtml (i)
{
	document.getElementById('b-C4').innerHTML = "<hr class=\"nohr\" />"+
	"<object type=\"application/x-shockwave-flash\" data=\"../video/player_flv_maxi.swf\" width=\"553\" height=\"338\">"+
	"<param name=\"movie\" value=\"../video/player_flv_maxi.swf\" />"+
	"<param name=\"FlashVars\" value=\"config=../video/clip"+i+".txt\" />"+
	"</object>";
}

$(document).ready( function () { 

$(function() {
    setInterval( "slideSwitch()", 1800 );
    //setInterval( "NextPage()"   , 15000 );
});


/*
$("#c1-a-next").click( function () {
  $.ajax({
    type: "GET",
    url: "/ajax.php",
    data: "galim_page="+$('#c1-a-next').attr('name'),
    success: function(msg)
    {
      $("#b-C1").html(msg);
    }
  });
  return false;
});
*/


$("#b-").mouseover( function () { redir = 0; });
$("#b-").mouseout(  function () { redir = 1; });


}); 

