// remap jQuery to $
(function($){})(window.jQuery);

var carousel_config = {
	onCreate	: function ( items, sizes) {
		console.info( items );
		console.info( sizes );
		var wrapper = document.getElementById( 'facilities-inside-fix' );
		var left_padding = ( wrapper.clientWidth - sizes.width ) / 2 ;
		wrapper.style.paddingLeft = Math.round( left_padding ) + 'px';
	},
	circular    : true,
	padding		: [0, 0, 0, 5],	/* Сдвиг, чтобы не съедалась тень элемента */
	infinite    : true,
	auto		: {
		play			: false
	},
	scroll		: {
		mousewheel		: true
	},
	items		: {
		/*width			: '243'*/
	},
	prev        : "#arrow-left",
	next        : "#arrow-right"			
}

/* trigger when page is ready */
$(document).ready(function (){

	// your functions go here
	
	$(function() {
		$('#carousel').carouFredSel( carousel_config );
	});

});


/* optional triggers

$(window).load(function() {
	
});
*/
$(window).resize(function() {
	// your functions go here
	$(function() {
		$('#carousel').carouFredSel( carousel_config );
	});	
});

/* */
