$(document).ready(function(){

	setTimeout(function(){
		$(".logo_move").animate({
		    top: "-20px",
		  }, 500 );
	}, 1500);
	
	$("#ticker img").each(function(index) {
    	$(this).css("top", (100-$(this).height())/2);
  	});
	
	$("a[rel=image_group]").fancybox();
	
	$("#comite tr td:first-child").each(function() {
    	$(this).css("width","110px");
  	});
  	
  	height_sidebar = $("#img_gallery_page").height();
  	height_content = $("#txt_content").height();
  	if(height_sidebar < height_content){
  		$("#img_gallery_page").height(height_content);
  	}else{
  		$("#txt_content").height(height_sidebar);
  	}

	$(".menu a").each(function() {
    	$(this).attr("title", "");
  	});  	
  	
  	$(".tabs").children("li").eq(4).children("a").css("border-right", "1px solid #CCCCCC");
  	
  	if(gup("tab") == "news"){
  		$("ul.tabs").tabs("div.panes > div.pane", {initialIndex: 1});
  	}
  	if(gup("tab") == ""){
  		$("ul.tabs").tabs("div.panes > div.pane");
  	}
	if(gup("tab") == "calendrier"){
  		$("ul.tabs").tabs("div.panes > div.pane", {initialIndex: 4});
  	}
	if(gup("tab") == "resultats"){
  		$("ul.tabs").tabs("div.panes > div.pane", {initialIndex: 2});
  	}
	
	$("#list_team").children("li").eq(4).css("margin-right","0px");
	
	$("ul#ticker").liScroll();
	
	setTimeout(function(){
		$("#hide_ticker").fadeOut(1000);
	}, 1500);
	
});

function gup(name){
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}
