jQuery(document).ready(function($) {

    $('a[rel^="prettyPhoto"]').prettyPhoto({
      theme:      'facebook'
    });

    $('.boutonHome, .boutonContact').mouseover(function(){
        $(this).animate({
            left: '+=2',
        }, 50, function() {
            $(this).animate({
                left: '-=4',
            }, 25, function() {
                $(this).animate({
                    left: '+=2',
                }, 50, function() {
                    // Animation complete.
                })        
            })        
        });
    });

    $('.boutonHome, .boutonContact').mousedown(function(){
        $(this).animate({
            top: '-=5'
        }, 50, function() {
            // Animation complete.
        });
    });

    $('.boutonHome, .boutonContact').mouseup(function(){
        $(this).animate({
            top: '+=5'
        }, 50, function() {
            // Animation complete.
        });
    });


    $('.slideshow').before('<ul id="vignettes">').cycle({
        fx:      'scrollHorz',
        speed:   500,
        timeout: 5000,
        pause:   true, 
        pager:   '#vignettes',
	    prev:    '#slideshowPrec',
    	next:    '#slideshowSuiv',

        pagerAnchorBuilder: function(idx, slide) {
            return '<li><a href="#"><img src="' + slide.src + '" width="29" height="29" /></a></li>';
        }
    });

});
