/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
jQuery.noConflict();
jQuery(document).ready(function() {
	var count = 0;
        jQuery('.fields').each(function(){
            if(count == 2){
                jQuery(this).removeClass('fields');
            }
            count++;
        });
        jQuery('.tx-loginboxmacmade-pi1 input').each(function(){
            if(jQuery(this).attr('type') == 'submit' && jQuery(this).val() != 'Login' && jQuery(this).val() != 'Envoyer'){
                jQuery(this).parent('div').removeClass('fields');
                jQuery(this).parent('div').addClass('logout_fields');
                jQuery(this).val('');
                jQuery('#LoginForm').addClass('LoginForm-logged');
            }
        });
        jQuery('.tx-loginboxmacmade-pi1-forgotpasswordForm').children('label').css('background-image', '');

        jQuery('.social_networks').hover(function(){
            jQuery(this).css('opacity', '0.9');
            jQuery(this).css('filter', 'alpha(opacity = 90)');
        },function(){
            jQuery(this).css('opacity', '0.5');
            jQuery(this).css('filter', 'alpha(opacity = 50)');
        });
        jQuery('.social_networks img').each(function(){
            jQuery(this).hover(function(){
                if(jQuery(this).attr('id') == 'facebook'){
                    jQuery(this).attr('src', 'fileadmin/templates/one_placement/images/facebook_hover.png');
                }else if(jQuery(this).attr('id') == 'twitter'){
                    jQuery(this).attr('src', 'fileadmin/templates/one_placement/images/twitter_hover.png');
                }else{
                    jQuery(this).attr('src', 'fileadmin/templates/one_placement/images/linkedin_hover.png');
                }
            }, function(){
                if(jQuery(this).attr('id') == 'facebook'){
                    jQuery(this).attr('src', 'fileadmin/templates/one_placement/images/facebook.png');
                }else if(jQuery(this).attr('id') == 'twitter'){
                    jQuery(this).attr('src', 'fileadmin/templates/one_placement/images/twitter.png');
                }else{
                    jQuery(this).attr('src', 'fileadmin/templates/one_placement/images/linkedin.png');
                }
            });
        });

        if(jQuery('.tx-dropdownsitemap-pi1 ol').css('display') == "none"){
            jQuery('.expAll img').attr('src', 'typo3conf/ext/dropdown_sitemap/res/exp-on.gif');
        }else{
            jQuery('.expAll img').attr('src', 'typo3conf/ext/dropdown_sitemap/res/exp-off.gif');
        }
        jQuery('.expAll > a').click(function(){
            if(jQuery('.tx-dropdownsitemap-pi1 ol').css('display') == "none"){
                jQuery('.tx-dropdownsitemap-pi1 ol').slideDown();
            }else{
                jQuery('.tx-dropdownsitemap-pi1 ol').slideUp();
            }
        });
});


