/* VALIDATION FORM LOGIN */
	$(function () {
		$('#forget').click(function () {
			$(this).blur();
			 if ($.browser.msie && $.browser.version == 6.0) {
				var maskHeight = $(window).height();
			} else {
				var maskHeight = $(document).height();
			}
			var maskWidth = $(window).width();
			var id = $('#successmsgdiv2');
			$('#page_mask').css({'width':maskWidth,'height':maskHeight, 'opacity':0.6});
			$('#page_mask').fadeIn('fast');
			$(id).fadeIn(700); 
			$('#successmsgdiv2 .close').click(function () {
				$('#page_mask, #successmsgdiv2').fadeOut();
			});		
			return false;
		});

	});
/*Faite voter vos amis*/
	$(function () {
		$('#faite_voter').click(function () {
			$(this).blur();
			 if ($.browser.msie && $.browser.version == 6.0) {
				var maskHeight = $(window).height();
				$('select').hide();
			} else {
				var maskHeight = $(document).height();
			}
			var maskWidth = $(window).width();
			var id = $('#faite_voter_layer');
			$('#page_mask').css({'width':maskWidth,'height':maskHeight, 'opacity':0.6});
			$('#page_mask').fadeIn('fast');
			$(id).fadeIn(700); 
			$('#faite_voter_layer .close').click(function () {
				$('#page_mask, #faite_voter_layer').fadeOut();
				$('select').show();
			});		
			return false;
		});

	});

/*form inscription*/
function check() {
	
	var erreur = 0;
if (document.inscription.email.value == "")	{
		erreur+=1;
	}

if (erreur == 0) return(false);
	else	{
		return(false);
	}
 }

/* CAROUSEL 
function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
    carousel.buttonPrev.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
   carousel.buttonNext.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 4,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});
*/
/*  INPUT */
$(document).ready(function(){
   /* $("input:text, textarea, input:password").each(function(){
        if(this.value == '')
            this.value = this.title;
    });*/
    $("input:text, textarea, input:password").focus(function(){
        if(this.value == this.title)
            this.value = '';
    });
    $("input:text, textarea, input:password").blur(function(){
        if(this.value == '')
            this.value = this.title;
    });
    $("input:image, input:button, input:submit").click(function(){
        $(this.form.elements).each(function(){
            if(this.type =='text' || this.type =='textarea' || this.type =='password' ){
                if(this.value == this.title && this.title != ''){
                    this.value='';
                }
            }
        });
    });
});

$(document).ready(function(){
	$('.form_recette form p.submit input').hover(function() {
		$(this).css('background-position','0 -60px');
	}, function() {
		$(this).css('background-position','0 0');
	});
});

/* ZEBRA TABLE */
$(function(){
	$('.content_list table tbody tr:not(.sep):even td ').css('backgroundColor','#f5bad1');
	$('.content_list table tbody tr:not(.sep):odd td ').css('backgroundColor','#f9d7e4');
});