var $seb = jQuery.noConflict();
     
     // Put all your code in your document ready area
    // jQuery(document).ready(function($){






 $seb(document).ready(function(){
    
  $seb("li").mouseover(function(){
    $seb(this).stop().animate({backgroundPosition:"0px -60px"},500);
    
    
  });
  
  //------CONTENEUR LECTURE
$seb("#containerLivre").click(function(){
 $seb("#conteneurLecture").stop().animate({
  width: "950px",
   height:"0%"  
 },1000)
 
 .animate({
  width: "950px",
   height:"600px"
 },1000,"linear",callback)  
 
 
});


 function callback(){
 
 

var refcliquer=document.getElementById("refcliquer").value;
//alert(refcliquer);
var chaine='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="950" height="700" id="livre" align="middle">';
chaine+='<param name="allowScriptAccess" value="sameDomain" />';
chaine+='<param name="allowfullscreen" value="true" />';
chaine+='<param name="movie" value="flash/'+refcliquer+'/megazine/megazine.swf" />';
chaine+='<param name="loop" value="false" />';
chaine+='<param name="quality" value="high" />';
chaine+='<param name="bgcolor" value="#333" />';
chaine+='<param name="WMODE" value="Transparent" />';

chaine+='<embed src="flash/'+refcliquer+'/megazine/megazine.swf" loop="false" wmode="transparent" quality="high" bgcolor="#333" width="950" height="700" name="livre" align="middle" allowfullscreen="true" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
chaine+='</object>';


document.getElementById("conteneurLecture").innerHTML=chaine;

		
 };


 
 
 


//-----------------

  $seb("li").mouseout(function(){
    
     $seb(this).stop().animate({backgroundPosition:"0px 0px"},500);
    
  });
  
  
   $seb(".sousnavigation li").mouseover(function(){
    $seb(this).stop().animate({backgroundPosition:"0px -20px"},500);
    
    
  });
  
   $seb("#containerLivre").mouseover(function(){
    $seb(this).css('background', 'url(images/livre_ouvert.png) bottom center no-repeat'); 
    
  });
   
    $seb("#containerLivre").mouseout(function(){
    $seb(this).css('background', 'url(images/livre_ouvert_rouge.png) bottom center no-repeat'); 
    
  });
  
  /*
    $("ul.subnav").parent().append("<span>t</span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)

	$("ul.topnav li span").mouseover(function() { //When trigger is clicked...

		//Following events are applied to the subnav itself (moving subnav up and down)
		$(this).parent().find("ul.subnav").slideDown('slow').show(); //Drop down the subnav on click

		$(this).parent().hover(function() {
		}, function(){
			$(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
		});

		
	});

  */
  
  
  $seb(function(){
    /*
     * Étape 2 : préparation du menu
     */
    $seb('#navigation > li > ul').hide();
    $seb('#navigation').appendTo('#welcome-bar');
  });


   $seb(function(){
    /*
     * Étape 3 : assignation des évènements et transformation
     */
    $seb('#navigation > li')
      .each(function(){
        var title = $seb('span:first', this);
        var href = $seb('a:first', this).clone();
        href.text(title.text()).wrapInner('<span></span>');
        title.html(href);
       })
      .find('span > a').bind('mouseenter', function(){
      
        $seb(this).parents('li.column').find('> ul').slideDown(500);
         
      }).end()
      .bind('mouseleave', function(){
        $seb('> ul', this).fadeOut(200);
      });

   });
  
 
 
 
 
 
 
 
 
  
});


