
	$(document).ready(function() {
		//alert('asd');
		$('.start_numbers').click(function() {
			for(i=1;i<=6;i++)
				{
					$('.start_numbers').removeClass('start_numbers_active');
				}
			$('#' + this.id).addClass('start_numbers_active');
			idnumber = this.id.substr(13);
			idnumber = parseInt(idnumber);
			//alert(this.id.substr(13));
			$("#start_fadetext_help").html(idnumber);
			});
		$('#start_number_1').addClass('start_numbers_active');
		$("#wrapper").append('<div style="display:none;" id="start_fadetext_help">1</div>'); //display:none;

	/*
	$('#re_gyorskereso_table tbody tr:odd').css('border','1px solid red');
	$('#re_gyorskereso_table tbody tr:even').css('background-color', 'blue');
	*/

	});
	
	function start_textfade(textid)
		{
			textid = parseInt(textid);
			//alert(textid);
			for(i=1;i<=6;i++)
				{
					if(i == textid)
						{
							$('#start_fadetext_' + i).fadeIn(500);
						}
					else
						{
							$('#start_fadetext_' + i).fadeOut(500);
						}
				}
		}

	function start_textfade_next(maxnum)
		{
			textid = $('#start_fadetext_help').html();
			textid = parseInt(textid);
			maxnum = parseInt(maxnum);
			if(textid == maxnum) { textid = 0; }
			textid++;
			//alert(textid);

			for(i=1;i<=6;i++)
				{
					$('.start_numbers').removeClass('start_numbers_active');
				}
			$('#start_number_' + textid).addClass('start_numbers_active');


			for(i=1;i<=maxnum;i++)
				{
					if(i == textid)
						{
							$('#start_fadetext_' + i).fadeIn(500);
						}
					else
						{
							$('#start_fadetext_' + i).fadeOut(500);
						}
				}
			$('#start_fadetext_help').html(textid);
		}

	function start_textfade_prev(maxnum)
		{
			textid = $('#start_fadetext_help').html();
			textid = parseInt(textid);
			if(textid == 1) { textid = maxnum; }
			textid--;
			maxnum = parseInt(maxnum);
			//alert(textid);

			for(i=1;i<=6;i++)
				{
					$('.start_numbers').removeClass('start_numbers_active');
				}
			$('#start_number_' + textid).addClass('start_numbers_active');

			for(i=1;i<=maxnum;i++)
				{
					if(i == textid)
						{
							$('#start_fadetext_' + i).fadeIn(500);
						}
					else
						{
							$('#start_fadetext_' + i).fadeOut(500);
						}
				}
			$('#start_fadetext_help').html(textid);
		}
