$(document).ready(function(){
	var ul1 = $("#indexFeatured");
	var effect_in_progress1 = false;
	
	var recurrentFunc1 = function() {
		if ($(this).hasClass('CMSBut')) {
			return true;
		}
		
		if (effect_in_progress1) {
			return false;
		}
	
		var left = (1 - parseInt($(this).attr('rel'))) * 541;
		var diff = (parseInt(ul1.css('marginLeft')) - left) / 541;
		
		if (diff < 0) {
			diff *= -1;
		}
		
		if (diff == 0) {
			return false;
		}
		
		$('#indexFeaturedTabs li.act').removeClass('act');
		$(this).parent().addClass('act');
		
		effect_in_progress1 = true;
		
		ul1.animate({
				marginLeft: left + 'px'
		}, diff * 200, 'linear', function() { effect_in_progress1 = false; });
	 
		return false;
	};
	
	$("#indexFeaturedTabs li a").click(recurrentFunc1);
});
