$(document).ready(function(){

//	$(".diaporama").diaporama({
//		animationSpeed: "slow",
//		delay:4
//	});

});
$(document).ready(function(){

	$(".offre_recente_slider").diaporama({
		animationSpeed: "slow",
		delay:10
	});
	
	$('.diaporama').diaporama({
		animationSpeed: "slow",
		delay:5
	});

});

/////////////////////



jQuery.unparam = function (value) {
    var
    // Object that holds names => values.
    params = {},
    // Get query string pieces (separated by &)
    pieces = value.split('&'),
    // Temporary variables used in loop.
    pair, i, l;

    // Loop through query string pieces and assign params.
    for (i = 0, l = pieces.length; i < l; i++) {
        pair = pieces[i].split('=', 2);
        // Repeated parameters with the same name are overwritten. Parameters
        // with no value get set to boolean true.
        params[decodeURIComponent(pair[0])] = (pair.length == 2 ?
            decodeURIComponent(pair[1].replace(/\+/g, ' ')) : true);
    }

    return params;
};






//////////////////////

var cookieList = function(cookieName) {
	
	var cookie = $.cookie(cookieName);
	var items = cookie ? cookie.split(/,/) : new Array();

	return {
	    "add": function(val) {
	    	a = decodeURIComponent($.param(val));
			items[items.length]= a;
			items.reverse(); 
			items = jQuery.unique(items);
			if(items.length > 5){
				items = items.slice(1,6);
			}	        
			$.cookie(cookieName, items,{ expires: 7, path: '/'});
	    },
	    "clear": function() {
	        $.cookie(cookieName, null,{ expires: 7, path: '/'});
	    },
	    "items": function() {
	    	a = new Array();
			for (var i = 0, j = items.length; i < j; i++) {
				a.push($.unparam(items[i]));
			}
	        return a;
	    }
	  }
}
