$(document).ready(function() {
	
	//Slide
	$(window).resize(function() {
			$(".scrollable").css('width', '100%');
			var $widthDiv = $(".scrollable").width();
			$(".scrollable .items div").css('width', $widthDiv);
	}).trigger("resize"); 
		
	$.easing.custom = function (x, t, b, c, d) {
		var s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	}
	
	$("#slide").scrollable({easing: 'custom', speed: 700, circular: true}).navigator().autoscroll({
		interval: 6000		
	});
	
	//siguiente - anterior
	$(".siguiente-proyecto a, .pagination-right a").addClass('btn').wrapInner('<span class="icon-right" />');
	$(".pagination-left a").addClass('btn').wrapInner('<span class="icon-left" />');
	
	$(".post-entry a:has(img:not(.no-gallery))").colorbox({transition:"fade", opacity:0.8, title:true, current: "Imagen {current} de {total}"});

});

