/**
 * @author actunet
 */
jQuery("document").ready(function($) {
	
	$("div.kultureLigne").each(function() {
		if($(this).children("h2").children("a").text().length > 24)
		{
			$(this).children("h2").children("a").css("font-size", "16px");
		}
	});

	/*
	 * Activation du module de kiosques
	 */
	$("a.kiosque_lien").click(function() {
		
		if($("." + $(this).children("img").attr("id")).css("display") == "none")
			$("." + $(this).children("img").attr("id")).slideDown("fast");
		else
			$("." + $(this).children("img").attr("id")).hide();
		return false;
	});
	
	if($("#content").height() < $("#sidebarcontent").height()) {
		var blueheight = $("#sidebarcontent").height() - $("#content").height() + 100;
		//$("#content").css("min-height",  $("#sidebarcontent").height());
		$("#credit").height(blueheight);
	}
	
	$("body > a").each(function() {
		if($(this).children('img').attr('height') == '1') {
			$(this).remove();
		}
	});

	// Gestion de l'espace du bloc agenda s'il n'y a pas de publicite
	//var publicite_laterale = $(".pubLatterale").children("a").children("img").attr('src');	
	//if(publicite_laterale.indexOf('empty')>-1){
	//	$(".pubLatterale").css('display','none');
		$("#agendaContent").css('min-width','300px');
	//	$("#agendaContent h3").css('width','100%');
	//}
		
	$("div.tickercontainer").prepend("<div class='visualmask'></div><div class='visualmask2'></div>");
	$("ul#ticker01").liScroll();
	
	$("#ticker01 > li > a").each(function() {
		$(this).colorbox({width:"50%", inline:true, href:"#"+$(this).attr('rel')});
	});
	
	
});
