jQuery(function($){
	$(".alertjs").remove();
	$('#numero').defaultvalue('Votre num\351ro');
	
$(document).ready(function() {	


	$(".a1").fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500);
/*-------------------------------------------------*/
$("#inscript").find(".widget").hover(function(){
	var alTxt = $(this).find("img").attr("alt"); 
	$(this).append("<div class='alt' style='width:" + ( $(this).outerWidth() - 4 ) +"px ; height:"+ ( $(this).innerHeight() - 4 ) + "px ; top:-" + ($(this).innerHeight() + 4 ) + "px;'></div>");
	$(".alt").fadeIn().append(" <div class='leg' style=' width:" + ( $(".alt").innerWidth() - 10 ) +"px;' >" + alTxt + "</div>");
	$(".leg").css("margin-top", ($(".alt").innerHeight() - $(".leg").innerHeight()  + "px"));
	$(".leg").fadeIn().animate({ opacity: 0.9});
},function(){$(".alt").fadeOut().remove();});
/*-------------------------------------------------*/
$(".home_elm").each(function(i){$(this).css('background-position' ,  '-'+(i * 187 )+'px' + ' 0px');});
$(".home_elm").hover( function(){
	$(this).append("<div class='home_elm_hover' style='top:-"+ ($(this).outerHeight() -10  ) +"px;'></div>"); 
	$(".home_elm_hover").fadeIn(1000);  
}, function(){$(".home_elm_hover").fadeOut(1000).remove();});
/*-------------------------------------------------*/
$('#left').click(function(){
	$('#slides').animate({'left': '0'}, 'slow'); 
	$('#left').animate({ 'width' : '0px' , opacity: 0  });
	$('#right').animate({ 'width' : '35px', opacity: 100 });
}); 
$('#right').click(function(){
	$('#left').animate({ 'width' : '35px' , opacity: 100 }); 
	$('#slides').animate({'left': '-885'}, 'slow');
	$('#right').animate({ 'width' : '0px' , opacity: 0 });
});
/*-------------------------------------------------*/
$("div[class^='gimmi']").hover(function(){
	var n = $(this).attr("class").substring(5,6);
	var position = $(this).offset();
	$("div[class^='gimmemo']").hide();
	$(".gimmemo."+ n  ).css("top" ,  position.top+ "px" );
	$(".gimmemo."+ n  ).css("left" ,  position.left + $(this).outerWidth() +"px" );
	$(".gimmemo."+ n  ).fadeIn();
} , function(){$("div[class^='gimmemo']").fadeOut()
});

var bit = 0;
$("#offre_fbx").click(function(){
	var ofleft = $(this).position();							   
	$("#flashsrc_container").css("left", ofleft.left );
	$("#flashsrc_container").css("top", ofleft.top );
	$("#flashsrc_container").fadeIn("slow");
if ( bit == 0  ){
	$("#flashsrc_body").append("<div id='flashsrc_body_inner'><object name='flashsrc_content' type='application/x-shockwave-flash' data='swf/flvplayer.swf' id='flashsrc_content' height='488' width='608'><param name='movie' value='swf/flvplayer.swf'><param name='flashvars' value='file=http://www.free.fr/adsl/swf/freebox.flv&amp;height=488&amp;width=608&amp;autostart=true&amp;displayheight=468&amp;showicons=true&amp;backcolor=0xCCCCCC&amp;frontcolor=0xFFFFFF&amp;lightcolor=0xDD0000&amp;screencolor=0xFFFFFF'><param name='allowfullscreen' value='true'></object> </div>");
	bit ++; 
}else{
	$("#flashsrc_body_inner").remove();
	$("#flashsrc_container").fadeOut(); 
	bit = 0;
}
});
/*-------------------------------------------------*/
$('#tabz div.tab').hide(); 
$('#tabz div.tab:first').show(); 
$('#tabz ul li:first a').addClass('selected'); 
$('#tabz ul li a').click(function(){ 
	$('#tabz ul li a').removeClass('selected'); 
	$(this).addClass('selected'); 
	var currentTab = $(this).attr('href');
	$('#tabz div.tab').hide(); 
	$(currentTab).fadeIn(); 
	return false;
 	});
});

});
