$(document).ready(function() {
		function updateDemo() {
			var options={
						effect: $('#effect').val(),
						speed: parseInt($('#speed').val()),
						still: parseInt($('#still').val()),
						// itemWidth: $('#resize').val() == '0' ? false : 'max',
						// itemHeight: $('#resize').val() == '0' ? false : 'max',						
						controls: $('#controls').val(),
						paging: '#paging'
			};

			// Demo1
	
		}
		$("#abbcycle").theatre({effect:"3d", paging:"#paging", selector:"img"})
});

function toggleFullExample(speed) {
	$('.codeLineExtra').toggle(isNaN(speed) ? null : speed);
}

function getOptionsString(optionsIn) {
	var defaults={
			selector: '> *:not(".theatre-control")',
			effect: 'horizontal', // 'horizontal'|'vertical'|'fade'|'show'|'slide'|'3d'|CUSTOM EFFECT NAME|OBJECT with constructor implementing the init,next,prev methods
			speed: 1000, // Transition speed
			still: 3000, // Time between transitions
			autoplay: true,
			controls: 'none', // display control buttons 'horizontal' or 'vertical' or 'none'
			itemWidth: 295, // width of the item or 'max' or false. 
			itemHeight: 212, // height of the item or 'max' or false. 
			width: true, // set the height of the container. By default honors the already set size using CSS
			height: true, // set the height of the container. By default honors the already set size using CSS
			onMove: false // function(index) {}, execution context is the Stage
	};
	var options={};
	for (var i in optionsIn) {
		if (optionsIn[i] !== defaults[i]) options[i]=optionsIn[i];
	}
	
	if (options.toSource) return options.toSource();

	var optString=[];
	for (var i in options) {
		  optString.push(i+':'+(typeof options[i] == 'string' ? '"'+options[i]+'"' : options[i]));
	}
	return '({'+optString.join(', ')+'})';
}
