var def_prenom='';
var def_nom='';
var def_email='';

$(document).ready(function()
{
	/*HACKS JS*/
	$('.menu_main .menu li').hover(
	function(){
    	$(this).addClass('sfhover');
    	},
    	function(){
    	$(this).removeClass('sfhover');
    	});
        
    	$(function() {
			var zIndexNumber = 1000;
			$('.menu_main .menu li').each(function() {
				$(this).css('zIndex', zIndexNumber);
				zIndexNumber -= 10;
			});
		});
    
    
    
    $('.close_popup').click(function(){
        $('.popup').fadeOut();
        return false;
    });
    
    $('.padtools .tools li a').hover(function(){
        $('.padtools .infos').html($(this).attr('title'));
        $('.padtools .infos').show();
    },
    function()
    {
        $('.padtools .infos').hide();
    })

    $('.menu_part a.side').css({opacity:0.7}).click(function(){
        return false;
    })
    
    $('.menu_part').hover(function(){
        $(this).children('a.side').stop().animate({opacity:1});
        $($(this).children('a.side').attr('href')).show();
    },
    function(){
        $(this).children('a.side').stop().animate({opacity:0.7});
        $($(this).children('a.side').attr('href')).hide();
    })
    
     $('.menu_part .menu li a').hover(function(){
        $(this).parent('li').children('.layer').stop().animate({opacity:0});
     },
     function()
     {
        $(this).parent('li').children('.layer').stop().animate({opacity:0.6});
     })
     
     $('.fav').click(function()
     {
        if (document.all) {
            window.external.AddFavorite(url,pageName);
        }
        else if (window.sidebar) {
            window.sidebar.addPanel(pageName, url, "");
        }
        else {
            alert("Désolé! Votre navigateur ne supporte pas cette fonction.");
        }
        return false;
     })
     
     
     $('.pad_actu .toggle a').click(function()
     {
        $('.pad_actu .actu').slideToggle();
        if($('.pad_actu .actu').hasClass('open'))
        {
            $('.pad_actu .actu').removeClass('open');
            $(this).children('span.show').show();
            $(this).children('span.hide').hide();
        }
        else
        {
            $('.pad_actu .actu').addClass('open');
            $(this).children('span.show').hide();
            $(this).children('span.hide').show();
        }
     })
});


