/* LOCAL FONTIONS DAVID LALUBIN */

function resizeFormat() {
		if( returnHeightScreen() < 624 ) {
			$('body').css('overflow','auto');
			$('html').css('overflow','auto');
			$('#format').css('top','0px').css('margin-top','15px');
			$('#format_fd').css('top','0px').css('margin-top','15px');
			$('#background_lueur').css('height','654px');
			$('#black_filter').css('height','654px');
		}
		else {
			$('body').css('overflow','hidden');
			$('html').css('overflow','hidden');
			$('#format').css('top','50%').css('margin-top','-313px');
			$('#format_fd').css('top','50%').css('margin-top','-312px');
			$('#background_lueur').css('height','100%');
		};
		
		if( returnWidthScreen() < 1235 ) {
			$('#IIIxIIIIIII_label').fadeOut();
		}
		else {
			$('#IIIxIIIIIII_label').fadeIn();
		}
	}
	
function initLang() {
	
	if( IE == false ) { $('.language:not(#'+langue+')').css({ opacity:0.8 }); }; // BUG IE ! PNGFIX ne support pas opacity
	
	if(langue=="en"){ $('#fr').css('background-position','-24px') };
	if(langue=="fr"){ $('#en').css('background-position','-24px') };
	
	$('.language').hover(
		function() { 
			if( IE == false ) {
				if($(this).attr('id') != langue ){ 
					$(this).css('background-position','0px').animate({ opacity:1 }, "fast");
					$('#'+langue+'').animate({ opacity:0.8 }, "fast");
				}
			}
			else { $(this).css('background-position','0px'); };
		},
		function() { 
			if($(this).attr('id') != langue ){ 
				$(this).css('background-position','-24px');
			};
			if( IE == false ) {
				$('.language:not(#'+langue+')').animate({ opacity:0.8 }, "fast");
				$('#'+langue+'').animate({ opacity:1 }, "fast");
			};
		}
	);
	
	$('.language').click(function() {
		langue_selected = $(this).attr('id');
		if(langue_selected != langue){ window.location="index.php?l="+langue_selected+""; };	  
	});
}
