//						 -------------------------------------
//						|Code pour le recadrage de l'interface|
//						 -------------------------------------


 

$(function(){
	//$oldHomeNewsHeight=$("#home_news").height();
	$test=false;
	recadrage();
});
$(window).resize(recadrage);
function recadrage(){
	var hauteurMin=$("#navig").height()+35;
	$("#home_news").height($("#news_content").height()+30);
	if(hauteurMin<=$("#page").height()){
		hauteurMin=$("#page").height()+40;
	}
	$("#content").height(hauteurMin);
	$("#all").height($("#content").height()+250);
	if($("#content").height()+250<$(window).height()){
		$("#all").height($(window).height());
		$("#content").height($("#all").height()-250);
		$("#home_news").height($("#content").height()-35);
	}
	if($test==false){
		test();
		recadrage();
	}else{
		$("body #navig ul li").css({top:"0px"});
		$("body #all form p").css({top:"0px"});
		$("body #all ul.skatingRinkRules li img").css({float:"left"});
		$("body #all .textSurUneLigne").css({top:"5px",bottom:"0px",paddingBottom:"15px"});
	}
}
function test(){
	$test=true;
}
//------------------------------------------
//|Code pour activer le popup de localisation|
// ------------------------------------------

$(function(){
	Shadowbox.init({
		onOpen: openSB,
		onChange: changeSB,
		onFinish: finishSB,
		onClose: closeSB,
		
		overlayOpacity: 0.7,
		overlayColor: "#F3F1E5",
		
		flashParams: {bgcolor:"#ffffff"}
	});
});
function openSB(){
	$a=$("#sb-nav-close");
	$("#sb-nav-close").remove();
	$("#sb-loading-inner span").text("_");
}
function changeSB(){
	$("#sb-nav").animate({opacity:0},150);
}
function finishSB(){
	$("#sb-nav").animate({opacity:1},150);
	$("#sb-title-inner").append($a);
	$("#sb-title-inner").css({marginTop:0});
}
function closeSB(){
	
}
