$.easing.elasout = function(x, t, b, c, d) {
			var s=1.70158;
			var p=0;
			var a=c;
			if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
			if (a < Math.abs(c)) { a=c; var s=p/10; }
			else var s = p/(2*Math.PI) * Math.asin (c/a);
			return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
};

var mes = false;
$(document).ready(function() {
		mes = parseInt($("#mes_selected").attr("title"));
        //alert(mes);
        if (mes>14)
        {
            if (mes<14) mes = 0;
            //else if (mes=19) mes = 12;
            else if (mes>14) mes = 5;
            else mes = 0;
        }
        else mes = 0;


    $items = $(".fechis").find('.control');
    $(".fechis").serialScroll({
        		items: $items,
				prev:'#arribaProg',
				next:'#abajoProg',
				duration:700,
				axis:'x',
				start: mes,
				force:true,
				lazy:true,//NOTE: it's set to true, meaning you can/remove/reorder the items and the changes are taken into account.
				step:1, //scroll 2 news each time
				cycle: false,
				event:'mousedown',
                //event:'mouseover',
                exclude: 6
			});

});

