$(window).load(function(){
	initCarousel();
	$('.par img, .slaider img').each(function(){
		var attrWidth = $(this).attr('width') + 5;
		var attrFloat = $(this).attr('align');
		var wrapper = $('<div class="foto"/>').css({'width': attrWidth, 'float': attrFloat});
		$(this).wrap(wrapper);
	});
	$('.flag').click(function(){
		$('.flag').removeClass('flag-active');
		$(this).addClass('flag-active')
		$('.contact').hide();
		var id = $(this).attr('map');
		$('#clinic-' + id).show();
	});
});

function initCarousel(){
	$("#main div.slaider").jCarouselLite({
    btnNext: "#main div.bg_slaider span.next",
    btnPrev: "#main div.bg_slaider span.prev",
    speed: 400,
	visible: 3,
	circular: true
});
$("#main div.box div.slaide").jCarouselLite({
    btnNext: "#main div.box div.left span.next",
    btnPrev: "#main div.box div.left span.prev",
    speed: 400,
	visible: 1,
	circular: true
});
}
