stepcarousel.setup({
	galleryid: 'mdlGallery',
	beltclass: 'belt',
	panelclass: 'item',
	autostep: {enable:true, moveby:1, pause:5000},
	panelbehavior: {speed:500, wraparound:false, persist:false},
	defaultbuttons: {enable: true, moveby: 1, leftnav: ['/public/images/design/carArrowLeft.gif', -12, 120], rightnav: ['/public/images/design/carArrowRight.gif', 0, 120]},
	statusvars: ['mdlGalFrom', 'mdlGalTo', 'mdlGalTotal'],
	contenttype: ['inline'],
	onBeforeSlide: function(from, to, last)
	{
		$('#mdlGallery .item:eq('+from+')').css({'z-index': '1'});
		$('#mdlGallery .item:eq('+to+')').css({'z-index': '40'});
		$('#mdlGallery .img:eq('+from+')').animate({'width': '110px', 'left': '0px', 'marginTop': '40px'});
		$('#mdlGallery .img:eq('+to+')').animate({'width': '160px', 'left': '-30px', 'marginTop': '0px'});
		$('#mdlGallery .item:eq('+from+') p').animate({'width': '110px', 'left': '0px'});
		$('#mdlGallery .item:eq('+to+') p').animate({'width': '160px', 'left': '-30px'});
		if(from==last && to==0){
			$('#mdlGallery .after .img:eq(0)').animate({'width': '160px', 'left': '-30px', 'marginTop': '0px'}).animate({'width': '110px', 'left': '0px', 'marginTop': '40px'});
			$('#mdlGallery .after .item:eq(0) p').animate({'width': '160px', 'left': '-30px'}).animate({'width': '110px', 'left': '0px'});
		}
		if(from==0 && to==last){
			var len=$('#mdlGallery .before .item').length-1;
			$('#mdlGallery .before .img:eq('+len+')').animate({'width': '160px', 'left': '-30px', 'marginTop': '0px'}).animate({'width': '110px', 'left': '0px', 'marginTop': '40px'});
			$('#mdlGallery .before .item:eq('+len+') p').animate({'width': '160px', 'left': '-30px'}).animate({'width': '110px', 'left': '0px'});
		}
	}
});

$(document).ready(function(){
	$("a[rel='galGroup']").colorbox({transition:'elastic', isImage: true, contentCurrent:'{current} / {total}'});
});