var startBoxes = function() {
	var box = $('#box-ms-NOT');
	var ul = $('#box-ms-NOT #tabs-left ul ');
	ul.find('li').each(function() {
		$(this).click(function(e) {
			if(typeof e.originalEvent != 'undefined')
				doSwitch=false;
			ul.find('.selected').removeClass('selected');
			$(this).addClass('selected');
			var id = $(this).attr('id').split('-')[2];			
			$('.tabs-div-Video-ms').hide();
			$('.tabs-div-Video-ms').eq(id-1).show();
			e.stopPropagation();
			return false;			
		});
	});
	ul.find('li:first').click();
	return true;
}


var switchBoxes = function(box_id){
	if(!doSwitch)return false;
	$('#box-ms-NOT #tabs-left ul li').eq(box_id).click();
	box_id++;
	if(box_id > 3)box_id=0;
	window.setTimeout(function(){
		switchBoxes(box_id);
	},5000);
}

var doSwitch = true;
$(document).ready(function(){
	startBoxes();
	switchBoxes(0);
});




