
// JavaScript Document


$(document).ready( function(){
							

// dans bebe_result.php uniquement
if( typeof(page_result) !='undefined' &&  page_result == true) 
{	 
	
	// affiche personnalité par défaut
	$("#main_left #personnalite").show().addClass('tag_rubrique_show');
	
	
	
	$(".bebe_content_foot div[class='rubrique_bt']").hover( function(){$(this).addClass('cursor_pointer')} , function(){$(this).removeClass('cursor_pointer')} );
	
	$(".bebe_content_foot div[class='rubrique_bt']").click( 
														   function()
														   { 
															  $('.tag_rubrique_show') .hide(); 
															  $("#main_left #" +  $(this).attr('id')).show().addClass('tag_rubrique_show');
														   }
														   
														   )
}

// TRANCHE D'AGE
$("a[id='tranche']").click(
		 function ()
		 {
			 tranche_age_value = $(this).attr('value') ;
			 tranche_age_text =  $(this).find("#age_text").html() ;
			 tranche_age_image = $(this).find("img").attr('src') ;

			 $('.tag_choix #children_value #tranche_child').val(tranche_age_value);
			 $('.tag_choix #tranche span').hide().html(tranche_age_text).fadeIn(400);
			 $('.tag_choix #tranche .tag_img img').hide().attr('src' , tranche_age_image).fadeIn(600);
			 
		 }
  );






// Choix direct du signe

$(".tablo_sign td").click(					   
					   
			   function () 
			   { 
   
			   // remise a zero form date naissance 
			   $("#form_carte_ciel select , #form_carte_ciel input ").val(''); 
			   $("#form_carte_ciel #city_complement").remove();
			     
			   zodiac_id =   $(this).children().children('.picto_sign').attr('value') ;
			   zodiac_sign =   $(this).children('.sign_txt_cell').html() ;
 
			   change_signe( 'zodiac' , zodiac_id , ucfirst(zodiac_sign) )  

			   }
 ); 
							



$(".tablo_sign td").hover(					   
			   function () {	$(this).children('.sign_txt_cell').addClass('sign_txt_cell_selected');} , 
			   function () {    $(this).children('.sign_txt_cell').removeClass('sign_txt_cell_selected'); } 
 ); 




$("#valide_profil").click(
					
					  function()
					  {
						
						$('.content_error_reporting').hide();
						
						var tranche_age_value = $('.tag_choix #children_value #tranche_child').val();
						var sign_value = $('.tag_choix #children_value #zodiac_child').val();
						var ascendant_value = $('.tag_choix #children_value #ascendant_child').val();
						
						var message_error = '';
						
						if(tranche_age_value=='') { message_error += "<span class='highlight'>*</span> Indiquez la tranche d'âge de l'enfant.<br/>&nbsp;&nbsp;&nbsp;Votre enfant doit avoir entre 0 et 14 ans.<br/>"}
						if(sign_value=='') { message_error += "<span class='highlight'>*</span> Indiquez sa date de naissance ou cliquez sur son signe astrologique.<br/>"}
						if(ascendant_value=='' && message_error !='') { message_error += "<span class='highlight'>*</span> En indiquant l'heure et la ville de naissance nous calculerons<br/>&nbsp;&nbsp;&nbsp;son ascendant pour une analyse plus précise."}
						
						if(message_error !='')
						{
						$('.content_error_reporting').html(message_error).show(400);
						} else {
						$(".tag_choix #children_value").submit() ;
						}
						
					  }
  
						  );
				
							
							
});  // end document ready 


/*
function show_rubrique()
{
	alert('show_rubrique') ;
}
*/


function trigger_astro_response ( astro_response)
{ 
	//calcul âge
	
				txtByr= astro_response.birth_date.substr(0,4);
			txtBmo= astro_response.birth_date.substr(5,2);
			bday= astro_response.birth_date.substr(8,2);

			
			var bday=parseInt(bday);
			var bmo=(parseInt(txtBmo)-1);
			var byr=parseInt(txtByr);
			var byr;
			var age;
			var now = new Date();
			
			tday=now.getDate();
			tmo=(now.getMonth());
			tyr=(now.getFullYear());
	
			if((tmo > bmo)||(tmo==bmo & tday>=bday))
				{
					age=byr;
					
					}
			else
				{
					age=byr+1}
						
			age = tyr-age;
			
			

			
	//fin calcul âge
	
	if(astro_response.zodiac_id != '')     {
		change_signe( 'zodiac' , astro_response.zodiac_id , ucfirst(astro_response.zodiac_sign) ) 
		
		if(age<3)	{
				tranche_age_value = 1;
				tranche_age_text = 'De 0 à 3 ans';
				tranche_age_image =CDNPATH+'1/astro_bebe/age1.jpg';
			}
		if(age>=3&&age<7) {
				tranche_age_value = 2;
				tranche_age_text = 'De 3 à 7 ans';
				tranche_age_image =CDNPATH+'1/astro_bebe/age2.jpg';
			}
		if(age>=7) {
				tranche_age_value = 3;
				tranche_age_text = 'De 7 à 14 ans';
				tranche_age_image =CDNPATH+'1/astro_bebe/age3.jpg';
			}
		if(age>14) {
				tranche_age_value = '';
				tranche_age_text = '';
				tranche_age_image ='';
			}

		$('.tag_choix #children_value #tranche_child').val(tranche_age_value);
		$('.tag_choix #tranche span').hide().html(tranche_age_text).fadeIn(400);
		$('.tag_choix #tranche .tag_img img').hide().attr('src' , tranche_age_image).fadeIn(600);
	}
	if(astro_response.ascendant_id != '')  { change_signe( 'ascendant' , astro_response.ascendant_id , ucfirst(astro_response.ascendant_sign) )  }
}


function change_signe( type , sign_value , sign_text ) 
{
 
 var img_path = CDNPATH+'1/astro_bebe/horo/';
 var ext =  '.png'; 

 if(type ==  'zodiac')	
		 {
				$('.tag_choix #children_value #zodiac_child').val(sign_value);
				$('.tag_choix #choosen_zodiac .tag_sign_text').html(sign_text);
				$('.tag_choix #choosen_zodiac .tag_sign_img img').attr('src' , img_path + sign_value + ext );
		 }
 
  if(type ==  'ascendant')	
		 {
				$('.tag_choix #children_value #ascendant_child').val(sign_value);
				$('.tag_choix #choosen_ascendant .tag_sign_text').html(sign_text)
				$('.tag_choix #choosen_ascendant .tag_sign_img img').attr('src' , img_path + sign_value + ext );
		 }

	
}








// virer le reste probablement  .... 











/*
$(document).ready( function(){

  //
  if(typeof(browser)=='undefined'){browser = 'unknow' ;}
  
  
  
   
  // arrache :)
  $('#unknow_hour').remove();
  $('label strong').remove();
  // func das astro result 
  click_icon_menu() ;
  
  img_sign() ;
  
  function img_sign()
  {
	  $('.sign_img_cell').css("opacity",0.8)
  }
  
  
  
  function click_icon_menu()
  {
  
  $('.icon_menu a').click(
						function()
						{
							
							
							$(".visible_rubrique ,.rubrique").hide();
							var id=$(this).attr('id');
							$(".rubrique[id='"+ id + "']").css("opacity",0).show().animate({ opacity: 1 },700).addClass('visible_rubrique'); ; 
						}
						);
  
  }
  
  
  
  $('#submit_bt').click( 
									   			   			   
			function () 
			{
				$("#info_box").hide();			
				if(typeof(callBackError) == 'undefined') { callBackError =  highLightError ; }					
				check_form( this , callBackError  )   ; 
			}	
			
	);



function check_form (trigger , callBackError)
 {
		 	 		 
		 var form_id =   '#' + $(trigger).parents("form").attr("id") ; 	
		 var form_values = $(form_id ).serialize() ;
		 var page =  $(form_id).attr('action') ;

		$.post(    page ,     
					       form_values  ,  	  
								function(response)  
								{ 
								 var statut =  response.statut  ; 
								 	
								 
								 // debug pour empecher ENTER sur index , zarb
								 $('#check_enter').remove(); 
								 $('#form_inscription').append("<input type='hidden' name='check_enter' id='check_enter'  value='false'/>");

								 
								 if(statut ==  true)
								 {

								 } else {	 
								 
								 
								 callBackError(response) ;
								 }
			 
								 } 
				       , "json"
				  );
		
		}


	
	function highLightError(response )
	{  
		 
		  data_collection = response.data_collection ; // tout les datas retournés , trimés
		  error_collection =  response.error_collection ; // les champs a probléme
		  
	//clean last class ok/error
	$("span[id='icon_field']").remove();
	$(".valideElement").removeClass("valideElement");
	$(".errorElement").removeClass("errorElement");
	 
	   $.each( data_collection, function(key, value)
				{ 
					$verif = error_collection[key] ;
			
					if(typeof($verif) == 'undefined') // pas trouvé dans l'objet erreur => champs ok
					{
					var classToAdd =  "valideElement" ;
					} else {
					var classToAdd =  "errorElement" ;
					}
					
					$( ' #' + key).addClass(classToAdd) ;
		

				 });	 // end each 
	  

	
	}
	











$('#back_astro').click(function(){
	window.location.href = '/horoscopes/astrobebe/'; 
});






$('#valide_profil').click(
						   function ()
						   {
							var zodiac_id =   $('#zodiac_id_astro').val();
							var ascendant_id_astro =   $('#ascendant_id_astro').val();
							var tranche_age =   $('#tranche_age').val();
							var city_birth_id =   $('#city_birth_id').val();

				if( typeof('zodiac_id')=='undefined' ||zodiac_id =='' || typeof('tranche_age') == 'undefined'|| tranche_age=='' )
				{
					// alert('error : ' + birth_date +  '' + birth_time   + '' + city_birth_id );
				}  else {   

					//  var birth_date =  year_birth + '-' + month_birth + '-'  + day_birth  ;
								
					
					if(hour_birth!='' && min_birth != '')
					{
					 var birth_time =  hour_birth + ':' + min_birth   ;
					} else {
					  var birth_time = 'unknown'   ;
					}
					
					
					 if(city_birth_id == ''){city_birth_id = 'unknown' }
					 if(ascendant_id_astro == ''){ascendant_id_astro = 'unknown' } 
					 
					//  param = '?birth_date='+ birth_date + '&hour_birth='+ hour_birth +'&city_birth_id='+city_birth_id + '&tranche_age='+ tranche_age ; 
				 param = '?zodiac_id='+ zodiac_id  +'&city_birth_id='+ city_birth_id  +'&ascendant_id_astro='+ ascendant_id_astro + '&tranche_age='+ tranche_age ; 
			     window.location.href = '/astro/bebe_result' + param ;    
				} 
							
							
						   }
						   );



// CITY_BIRTH

/*

 city_birth_show(); 
 
 function city_birth_show() // loading et Affichage du module city_birth  avec auto_complete
 {
		if ( $("#city_birth").length ==  0  )  { return false ; }  // si le input n'a pas été affiché par la class  FormInscription -> stop
		
		// Auto Complete proposition ville
		$("#city_birth").keyup(function(event){
		var text = $(this).val();
		
		$('#city_birth_id').val('') ;
		   
		$("#city_complement").remove();
		$("#city_birth").css("color","#7E7E7E");
		   
		// timer on keyup , déclenche le call ajax uniquement si pause de 700 ms entre 2 frappes
		$(this).stopTime('timer_keyup'); // kill le precedent timer 
		$(this).oneTime( 500, 'timer_keyup', function() { 
													  city_suggest(text);  
													  });    
		 });
		

		
		// sur Blur , si aucune ville selectionné par le user , checke si une ville dans la liste correspond 100 % avec ville tapée
		$("#city_birth").blur(function () {

			var info_city_selected = false ; // default
			
			if(typeof(global_city_response)!= 'undefined')
				{  				 	
				 
				 var city_asked = $("#city_birth").val().toLowerCase() ; 				  
				  
				  $.each(global_city_response.city_result, function(key, value) 
				   {
					 var city_name_elem  = split_city_name_propo(value.city_name_propo) ;
					 var city_name_elem_1 = city_name_elem[0] ;
					 var city_name_elem_2 = city_name_elem[1] ;
					 var city_name_compare  = city_name_elem_1.toLowerCase() ;
					 
					 if( city_name_compare == city_asked )
					   { 	
							completeCityBirth (city_name_elem_1 , city_name_elem_2 ) ;
							info_city_selected = global_city_response.city_result[key] ;			 		
					   } 
				   }
						 
				  ); // end each					 	  
				   
				 // getAstro() ;
				
				} // end if
				
				
			attribute_city_values(info_city_selected) ;
			hide_city_list() ;	
   		   
        });

		
 }
 */



/*

function city_suggest(txt) {
    
	 
	 // alert('city_suggest => delete global_city_response') ;
	 delete global_city_response;

	if(txt.length <= 3) 
	{
    // $("#suggestions").hide();
    } else {
    
	var page =  '/lab/ajax/_get_city' ;
	// var page =  '_get_city' ;
	post_value = new Object ;
	post_value.city_to_complete =  txt ;
	

	var city_to_complete =  txt ;
	$.post(    page ,
			   post_value ,
			   function(city_response)  
			   { 		 		
				
				// ----- To Create the Div List --------
				var pos_input_city = $('#city_birth_line').offset();
				
				
				if(browser!= 'light')
			   {
				var decal_top = 20 ;
				var decal_left = 170 ;
			   } else { // iphone
			    var decal_top = 20 ;
				var decal_left = 100 ;
			   }
				var top_pos_city_list = pos_input_city.top  + decal_top ;
				var left_pos_city_list = pos_input_city.left  + decal_left ;
				
				var page =  '/lab/ajax/_html_stuff' ;
				// var page =  '_html_stuff' ;
		        info_html = new Object ;
	            info_html.ask_for =  'div_city_list' ;
				info_html.element_name =  'city_list_cont' ;
				
				if(city_response.statut == true) // on a une liste a afficher 
				{
				// Set la liste sur objet global accéssible depuis autre partie du script
				global_city_response = new Object ;
				global_city_response = city_response ;
				
				
				

				$.post( page , info_html ,
						function(div_city_html)  
						{ 		 
						
						if ( $('#'+ info_html.element_name).length == 0 ) 
						{
						$('body').append(div_city_html) ;
						$('#'+ info_html.element_name).css({'top':top_pos_city_list , 'left':left_pos_city_list , 'opacity':0}) ;
						$('#'+ info_html.element_name).animate({ opacity: 1 },200);
						} else {
						 $('#'+ info_html.element_name + ' #city_propo').remove(); // refresh de la liste proposée
						}
						
						
							var city_list = city_response.city_result ;
							var ind = 1 ;
							$.each(city_list, function(key, value) 
							{  
							var city_info = city_list[key] ;
						//  var city_propo ='key:'+ key +',value:' + value + '->'+city_info.city_name_propo +'/' + city_info.lat +'/'+ city_info.long ;
							var city_propo =  city_info.city_name_propo ;
						 
						   city_propo = boldMe( city_propo , txt ); 
						 
							// Add la Row City à la Liste
							city_propo = "<div id='city_propo' value='"+  key  +"' > <span>" +  city_propo + " </span> </div>" ;
							$('#'+ info_html.element_name +' #main').append(city_propo) ;
							
							// Alternate color row 1/2 
							if(is_int(ind/2)){$("div[id='city_propo'][value='"+ key +"']").addClass('classWhiteFond'); }
							ind ++ ;
							
							// Bind le Behavior Click, passe en param l'object city_info, contient lat/long etc ..
							$("div[id='city_propo'][value='"+ key +"']").bind( "click", { info:city_info } , clickCity );	
							
							}) ; // end each
				
						} 
						  , "html"
				);


				}  else { // end if(city_response.statut == true)				
				$('#'+ info_html.element_name).remove(); 
				}
				
				} 
				  , "json"
			);
	
	
	//---------------
	} // end Else




} // end propo_ville func 

*/



/*
  function clickCity(event) 
  {
	var info = event.data.info ;
	var name_city = info.city_name_propo ;
	
	var city_name_elem  = split_city_name_propo(name_city) ;
	var city_name_elem_1 = city_name_elem[0] ;
	var city_name_elem_2 = city_name_elem[1] ;
	
	completeCityBirth (city_name_elem_1 , city_name_elem_2 ) ;
	hide_city_list() ;
	var value = $(this).attr('value');
	var info_city_selected = global_city_response.city_result[value] ; 
	
	
	//---
	// $.each(info_city_selected, function(key, value) {$('body').append(key + '-->' + value ) })
	// $('body').append('<br/>');
	//-----
	
	attribute_city_values(info_city_selected) ;

  }
  
  
 */ 
  


/*
  function completeCityBirth ( city_name_elem_1 , city_name_elem_2 )
  {
	$("#city_birth").val(city_name_elem_1);
	$("#city_birth").css("color","#006093"); 
	
	$('#city_complement').remove() ; 
	var city_complement = "<span id='city_complement'>" + city_name_elem_2 + "</span>" ;
	
	if(browser != 'light')
	{
	$("#city_birth").after(city_complement);
	$('#city_complement').css({ opacity: 0 }).addClass('city_complement').animate({ opacity: 1 },200);
	}  
	
	// hide_city_list() ;
  }
  
  */
  


/*
  function hide_city_list()
  {
	 var cont  = "#city_list_cont" ;
	$(cont).animate({ opacity: 0 },400,function(){$(cont).remove();}) ; // fade out and destroy
	// alert('hide_city_list');
  }
  
  */
  
 /* 
  function split_city_name_propo(city_name_propo)
  {
	var pos_split = stripos(city_name_propo , '(') ;
	var city_name_elem_1 = trim(city_name_propo.substr(0, pos_split-1)) ;
	var city_name_elem_2 = trim(city_name_propo.substr( pos_split )) ;
	
	var result = new Array(city_name_elem_1 , city_name_elem_2 ) ;
	return result ;
  }
  */
  
/*  
  function attribute_city_values(city_object)
  {  
	  
	  // $('#debug').append('  ----   attribute_city_values' + city_object + ', id=' + city_object.id + ' / ');
	  
	  if(typeof(city_object) == 'undefined' || city_object === false )
	  {
	  $('#city_birth_id').val('') ;
	  } else {   
	  var city_birth_id = city_object.id ;
	  // alert(city_birth_id);
	  $('#city_birth_id').val(city_birth_id) ;
	  // alert('val' + $('#city_birth_id').val());
	  
	  } 
	  
	  getAstro() ;

  }
  */
  
  
//  $('#city_birth_id').change(function () {alert('change ::!!!!! ');    } );

  

// ----------- ASTRO CALCUL -------


/*
$('#unknow_hour').click( 
						 function(){
							  
							  $('#hour_birth , #min_birth').val('');
							  }
						 );

*/



/*
astro_show(); // génére le div & elements icon  si demandés par classInscription

$("#form_inscription select[id$='birth']").change( 
												  function() 
												  { 
												     getAstro() ; 
													// alert( $(this).attr('id') ) ; 
													var elem = $(this).attr('id') ;
													if( elem == 'hour_birth' || elem == 'min_birth' )
													{
														$('#unknow_hour').removeAttr("checked") ;
													}
												 }
												  
												 
												  
												  );  // trigge astro au changement de param birth infos


function astro_show() // Affiche d'icon astro, si asked dans la class  FormInscription => recup le html de base 
{

		// si le input a été affiché par la class  FormInscription et que l'on a bien demandé les input astro  dans  FormInscription , sinon stop
		if ( $("#astro").length ==  0 || $("#astro_icon_line").length == 0 )  { return false ; } 
		
		
		var page =  '/lab/ajax/_html_stuff' ;
		// var page =  '_html_stuff' ;
		info_html = new Object ;
	    info_html.ask_for =  'icon_astro' ; 
		
		$.post(   page ,
			      info_html ,
					function(astro_html)  
					{ 		 
					 $("#astro_icon_line").html(astro_html);
					 getAstro() ;
					} 
					  , "html"
				);
		
		
}

*/



/*

function getAstro() //  check les valeur astro selon infos naissance => call Ajax ; // set les input hidden
{	
		
	// si le input astro a été affiché par la class  FormInscription
	if ( $("#astro").length ==  0 )  { return false ; } // doit pas arriver , triggé normalement par astro_show
	
	info_birth = new Object ;
	
	var day_birth = $('#day_birth').val();
	var month_birth = $('#month_birth').val();
	var year_birth = $('#year_birth').val();
	
	var hour_birth = $('#hour_birth').val();
	var min_birth = $('#min_birth').val();
	
	var city_birth_id = $('#city_birth_id').val();
		
	if( day_birth != '' && month_birth != ''  && year_birth != '' ) 
	{	
	info_birth.birth_date =  year_birth + '-' + month_birth + '-'  + day_birth  ;	
	} else {
	// clean tout astro si champs manquants
	$("input[id$='_astro']").val(''); // clean hidden
	$.each( $('#icon_sign img') , function(key, value) // clean img
								   {
									   var img = value ;
									   var source = $(img).attr("src");
                                       pos =  source.lastIndexOf('/')+1 ;
                                       path =  source.substr(0,pos) ;
                                       new_img = path + 'transparent.gif' ;
									   
									   $(img).attr("src" , new_img);   
								   });

	return false ; // end clean
	}
		
		
	if( hour_birth != '' && min_birth != ''  ) 
	{
		info_birth.birth_time =  hour_birth + ':' + min_birth   ;
	}
	
	
	if( city_birth_id != '' ) 
	{
		info_birth.city_birth_id =  city_birth_id  ;
	}
		
		
		  if(typeof(info_birth.birth_date) != 'undefined')
		 { 
			 var page =  '/lab/ajax/_get_astro' ;
			 // var page =  '_get_astro' ;
			 
			$.post(    page ,     
							   info_birth  ,  	  
									function(astro_response)  
									{ 		 
									      $.each( astro_response, function(key, value) // set les input hidden 
											{ 
												var astro_field =  '#' + key +'_astro';
												$(astro_field).val(value) ;
												///alert(astro_field+' = '+value);
												
												// Astro Bébé Stuff

										if(astro_field == '#zodiac_sign_astro'){ 
											$('#choosen_zodiac_title').html('');
											$('#choosen_zodiac_icon .titre_text').html(value); 
										}
										if(astro_field == '#zodiac_id_astro'){ 
											$('#choosen_zodiac_icon img').attr('src' , CDNPATH+'1/astro_bebe/horo/' + value + '.png');
										}
										
										if(astro_field == '#ascendant_sign_astro'){ 
											$('#choosen_ascendant_title').html('');
											$('#choosen_ascendant_icon .titre_text').html(value); 
										}
										if(astro_field == '#ascendant_id_astro')
										{ 
											$('#choosen_ascendant_icon img').attr('src' , CDNPATH+'1/astro_bebe/horo/' + value + '.png');
										}


												
											 });	 
										  
											 astro_icon() ;
									 } 
						   , "json"
					  );
		 }		
}


*/




/*
function astro_icon()
{
	 
 
	 if ( $("#astro_icon_line").length == 0 )  {return false ; } // si affichage des icons a été demandé
	 		
	icon_collection = $("#astro_icon_line #sign")   ;  // toutes les icon sign  a checker 
	
	$(icon_collection).each(function(){
	 
	astro_type =  $(this).attr('alt'); 
	pos =  astro_type.lastIndexOf('_') ;
	astro_type =  astro_type.substr(0,pos) ;
	 
	
	
	// cherche l'image a afficher
	
	icon_value = '';
	if(astro_type=='zodiac') 
	{ 
	    icon_value =  $('#zodiac_id_astro').val() ;    
		txt_value =   $('#zodiac_sign_astro').val() ;    
		extension = 	   '.jpg' ; 
	 
	  $("#debug_astro").append('icon_value->' + icon_value + '/');
	 
	 }
		
	// if(astro_type=='element') { icon_value =  $('#element_astro').val() }
	
	if(astro_type=='decan') 
	{
		icon_value =  $('#decan_astro').val() ;  
		txt_value =  $('#decan_astro').val() + ' Décan' ;  
	    extension = 	   '.gif' ; 
	 }
	
	 if(astro_type=='ascendant') 
	 { 
		 icon_value =  $('#ascendant_id_astro').val() ;   
	 	 txt_value =  $('#ascendant_sign_astro').val() ;  
		 extension = 	   '.jpg' ; 
	 }
	
	if(astro_type=='chinese') 
	{ 
	icon_value =  $('#chinese_id_sign_astro').val() ;  
	txt_value =  $('#chinese_sign_astro').val() ;  
	extension = 	   '.gif' ; 
	}

  
  //  si pas de result ajax , pas assez d'infos pour calculer un sign, ascendant etc..
  if(typeof(icon_value) =='undefined' || icon_value =='' )  
	{ 
	 icon_value = 'transparent' ;
	 txt_value =  ''; 
	 extension = 	   '.gif' ; 
	} 
	
	
	icon_value  +=  extension  ;

   
   // si nouvelle image a afficher,  remplacement image et text, sinon nothing 
   
   actual_img = $("#sign[alt='" + astro_type + "_thumb'] #icon_sign img").attr('src') ;
   pos =  actual_img.lastIndexOf('/')+1 ;
   path =  actual_img.substr(0,pos) ;
   actual_img = actual_img.substr(pos) ; 
   
   if(  icon_value != actual_img  )  
	{

		function changeIcon(what_element) 
		{
            what_element.css("opacity",0).attr('src' , path + icon_value).animate({ opacity: 1 },1000);
		} ;
		

		var element = $("#sign[alt='" + astro_type + "_thumb'] #icon_sign img") ;
		changeIcon(element) ;
		
		var zodiac_sign = 	  $('#zodiac_sign_astro').val() ;
		txt_value =  ucfirst( txt_value ) ;		
		element_txt =   "#sign[alt='" + astro_type +"_thumb'] #text_sign"; 		
		$(element_txt).css("opacity",0).text(txt_value).animate({ opacity: 1 },1000) ; 
	}  
   

	 });

	
	
	
}






}); // End Document Ready
	
	*/


