$(document).ready(function(){
	var options = {
		resizeLgImages:     true,
		displayNav:         true,
		handleUnsupported:  'remove',
		keysClose:          ['esc', 27] // c or esc
	};
	Shadowbox.init(options);
	$('.tooltip').tooltip({ 
		track: true, 
		delay: 500, 
		showURL: false,
		showBody: " - ", 
		opacity: 0.95, 
		left: 10,
		top: 10
	});				
	$('.phrases').tooltip({ 
		track: true, 
		delay: 500, 
		showURL: false,
		showBody: " - ", 
		opacity: 0.95, 
		left: 10,
		top: 10
	});				
	$("#derniers-commentaires ul").newsTicker(4000);
	
	// intégration de vidéos avec swfobject
	$(".integrate-flash").each(function(index){
		eval($(this).attr('rel'));
		$(this).before('<div id="anim-flash-content-'+index+'">'+$(this).html()+'</div>');
		$(this).css('display', 'none');
		$(this).css('text-align', 'center');
		$('#anim-flash-content-'+index).css('z-index', '0');
		swfobject.registerObject('anim-flash-content-'+index, "9.0.0", "expressInstall.swf");
		swfobject.embedSWF(
			$(this).attr('href'), 
			"anim-flash-content-"+index, 
			options.width,
			options.height, 
			"9.0.0",
			"expressInstall.swf", 
			{}, 
			{
				menu:"false",
				wmode: 'transparent',
				allowFullScreen: 'true',
				allowScriptAccess: 'always'
			}, 
			{id:"anim-flash-content-"+index,name:"anim-flash-content-"+index}
		);
	});
	
	$('textarea.code').click(function (){
		this.focus();
		this.select();
	});
	var ancre = document.location.hash;
	$(ancre).scrollTo(10000);
});

