$(document).ready(function() {
	$("ul.salles").jcarousel({
		easing: "easein",
		auto: 0,
		scroll: 1,
		animation: 500,
		wrap: "both",
		initCallback: mycarousel_initCallback
	});
});
$(document).ready(function() {
	$("ul.salons").jcarousel({
		easing: "easein",
		auto: 0,
		scroll: 1,
		animation: 500,
		wrap: "both",
		initCallback: mycarousel_initCallback
	});
});

jQuery(function($) {
	$('#video-seminaire-24h a').click(function() {
		Shadowbox.open({
			player: 'flv',
			content: $(this).attr('href'),
			width: 640,
			height: 480
		});
		return false;
	});

	$('#video-seminaire-24h a').append('<span class="btn_play"/>');

	$.resizeIcons('.infos_1');
});

function mycarousel_initCallback(carousel) {
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
    $("a.suiv").bind("click", function() {
		carousel.next();
		return false;
    });	
    $("a.prec").bind("click", function() {
        carousel.prev();   
        return false;
    });
}

// PHOTOS
function ShadowboxPhoto(id) {
	var items = $("a.sbxg_"+id);
	Shadowbox.open(items[0]);
}

// VIDEO
function ShadowboxVideo(id,src) {
	var items = $("a.sbxg_"+id);
	Shadowbox.open(items[0])
}

// PDF
function ShadowboxMedia(table,champ,id_champ,type_media,total_medias,titre) {
	
	var data = 'table='+table+'&champ='+champ+'&id_champ='+id_champ+'&type_media='+type_media;
	Shadowbox.open({
        player: "iframe",
        title: titre,
        content: "content/pages/iframe_medias.php?"+data,
        width: 500,
        height: (100*total_medias)+10
    });

}

sIFR.replace(centurygothic, {
	selector: 'h1.salle',
	thickness: 50,
	sharpness: 50,
	fitExactly: true,
	css: [
		'.sIFR-root { font-size: 22px; color: #2e323d; }',
		'a { font-weight: normal; color: #fb6c16; text-decoration: none; }',
		'a:hover { font-weight: normal; color: #FF4000; text-decoration: none; }',
		'strong { font-weight: normal; color: #cccccc; }',
		'em { font-style: normal; color: #999999; }'
		],
	wmode: 'transparent'
});

