/* -------------------------------------------------
Document JavaScript
Author : IEB - Kahiloa Solutions & communications
------------------------------------------------- */

$(document).ready(function(){
	$(".intro li a").bind("click focus", function(e){
		$(this).parent().css("z-index", "1");
		$(this).parent().siblings('li').css("z-index", "0")
	});
	
	$(".transcription a").bind("click", function(e){
		$(this).siblings(".hide").slideToggle(function() {
			$('#scroll').jScrollPane({showArrows: true});
		});
		return false
	});	

	$(".navLeft h3").bind("click focus", function(e){
		$(this).siblings("ul").slideDown('normal');
		$(this).parent().siblings("li").find("ul").slideUp('normal');
	});
	
	if ($("#scroll").get(0)) {
		$('#scroll').jScrollPane({showArrows: true});
		  if ($("#video").get(0)) {
			var wVideo = new SWFObject('../flash/mediaplayer.swf','wVideo','371','232','9','#FFFFFF');
			wVideo.addParam('allowfullscreen','true');
			wVideo.addParam('allowscriptaccess','always');
			wVideo.addParam("seamlesstabbing","true");
			wVideo.addParam("tabindex","0");
			wVideo.addVariable('image','../images/flash-preview.png');
			wVideo.addVariable('file','../flash/'+srcVideo);
			wVideo.write('video')
		  }
	}
	
	if ($("#singleLightbox").get(0)) {
		valTitle = $("#singleLightbox").find("img").attr("alt");
		$("#singleLightbox").attr("title", valTitle+", ouverture d'une animation Flash dans un popin");
		$("#singleLightbox").ariaLightbox();	
	}
	
	if ($("#parcoursSalarie").get(0)) {
		$("#parcoursSalarie").parent().click();
	}

	if ($("#mecanismeRepartition").get(0)) {
		$("#mecanismeRepartition").parent().click();
	}		
	
	if ($("#marquee").get(0)) {  
	$('#marquee div').SetScroller({	velocity: 	
		50,
		direction: 	 'horizontal',
		startfrom: 	 'right',
		loop:		 'infinite',
		movetype: 	 'linear',
		onmouseover: 'pause',
		onmouseout:  'play',
		onstartup: 	 'play',
		cursor: 	 'pointer'
	});
	} 	
});




