$(document).ready(function(){
	$(document).pngFix();
	
	$('#slideshow2').cycle({
		fx:     'scrollLeft', 
		speed:  'fast', 
		timeout: 0, 
		pager:  '#slideThumbs',
		
		// callback fn that creates a thumbnail to use as pager anchor 
		pagerAnchorBuilder: function(idx, slide) { 
			return '<a href="#"><img src="' + slide.src + '" width="150" /></a>'; 
		}
	});
	
	
	$('#toggled').hide();
	$('#toggleEdito').click(function(){
		$('#accueilBloc #toggled').toggle('slow');
	});
	
	$('#slideshow').cycle({
		fx:     'fade', 
		speed:  800, 
		timeout: 6000
	});
	
	setTimeout(function() { 
		$('#newsletter .wpcf7-response-output').fadeOut('slow');
	}, 3000);
	
	$('#newsletter').click(function(){
		$('#newsletter .wpcf7-response-output').fadeOut('slow');
	});
	
	$('input[type="text"], textarea').each(function() {
    var default_value = this.value;
    $(this).focus(function() {
        if(this.value == default_value) {
            this.value = '';
        }
    });
    $(this).blur(function() {
        if(this.value == '') {
            this.value = default_value;
        }
    });
});

});