function utf8_encode ( argString ) {
    // http://kevin.vanzonneveld.net
    // +   original by: Webtoolkit.info (http://www.webtoolkit.info/)
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: sowberry
    // +    tweaked by: Jack
    // +   bugfixed by: Onno Marsman
    // +   improved by: Yves Sucaet
    // +   bugfixed by: Onno Marsman
    // +   bugfixed by: Ulrich
    // *     example 1: utf8_encode('Kevin van Zonneveld');
    // *     returns 1: 'Kevin van Zonneveld'

    var string = (argString+''); // .replace(/\r\n/g, "\n").replace(/\r/g, "\n");

    var utftext = "";
    var start, end;
    var stringl = 0;

    start = end = 0;
    stringl = string.length;
    for (var n = 0; n < stringl; n++) {
        var c1 = string.charCodeAt(n);
        var enc = null;

        if (c1 < 128) {
            end++;
        } else if (c1 > 127 && c1 < 2048) {
            enc = String.fromCharCode((c1 >> 6) | 192) + String.fromCharCode((c1 & 63) | 128);
        } else {
            enc = String.fromCharCode((c1 >> 12) | 224) + String.fromCharCode(((c1 >> 6) & 63) | 128) + String.fromCharCode((c1 & 63) | 128);
        }
        if (enc !== null) {
            if (end > start) {
                utftext += string.substring(start, end);
            }
            utftext += enc;
            start = end = n+1;
        }
    }

    if (end > start) {
        utftext += string.substring(start, string.length);
    }

    return utftext;
}
$(document).ready( function() {
	
	$('.zodiac_element').click(function(){
		element_id = $(this).attr('id');
		for(i=1;i<=12;i++){
			if(i != element_id){
			  $("#zodiac_"+i).hide().addClass('displayNone');
			  $("#"+i).removeClass('current');
			}
		}
		$("#zodiac_"+element_id).fadeIn("slow").removeClass('displayNone');
		$("#"+element_id).addClass('current');
	});
	
	$('.oneCard').click(function(){
		$("#first").hide();
		element_id = $(this).attr('id');
		nb_elements = $(this).attr('rel');
		image = $(this).attr('rel2');
		$(this).css('background-image', 'url(/img/cartes/dos_grise.gif)');
		for(i=0;i < nb_elements;i++){
			if(i != element_id){
			  $("#view_"+i).hide().addClass('displayNone');
			}
		}
		$("#view_"+element_id).fadeIn("slow").removeClass('displayNone');
	});
	
	//Valeur par defaut du champs du texterea question email
	$('#question_email').example("Soyez aussi précis(e) que possible dans votre question.\nMerci de ne poser qu'une seule question a la fois.");
	$('.linkHoroscope').click(function(){

		signe = $(this).attr('rel');
		document.title = "Horoscope de l'annee 2010 "+signe+" - Claude Alexis voyance ";
	});
	
	$(".taro-oracle #face-a").hover(function(){
		$(".taro-oracle #hover img").fadeIn();
	});
	
	$(".taro-oracle #face-a").mouseout(function(){
		$(".taro-oracle #hover img").fadeOut();
	});

});
