function open_slaider(id, a_href)
{
	var str = "#"+id;
	var obj = $(str);
	obj.is(":hidden") ? obj.slideDown("slow") : obj.slideUp("slow");
}

function hidden_slaider(id, a_href)
{
	var str = "#"+id;
	var obj = $(str);
	obj.slideDown("slow");
}

function removeFirst()
{
			first = $('ul#listticker li:first').html();
			$('ul#listticker li:first')
			.animate({opacity: 0}, speed)
			.fadeOut('slow', function() {$(this).remove();});
			addLast(first);
}

function addLast(first)
{
	last = '<li style="display:none">'+first+'</li>';
	$('ul#listticker').append(last)
	$('ul#listticker li:last')
	.animate({opacity: 1}, speed)
	.fadeIn('slow')
}

$(document).ready(function()
{
	var first = 0;
	var speed = 700;
	var pause = 3500;
	if( $('table.table3').length > 0)
	{
		$('table.table3 > tbody > tr:first-child').addClass('trfirst');
		$('table.table3 > tbody > tr:last-child').addClass('trlast');
		$('table.table3 > tbody > tr:first-child').css('height', "42px");
		$('table.table3 > tbody > tr > td:first-child').css('background', "url('../../images/t_lr.jpg') left top repeat-y");
		$('table.table3 > tbody > tr > td:last-child').css('background', "url('../../images/t_lr.jpg') right top repeat-y");
		$('table.table3 > tbody > tr:first-child > td').css('background', "url('../../images/t_top.jpg') top repeat-x");
		$('table.table3 > tbody > tr:last-child > td').css('background', "url('../../images/t_bottom.jpg') top repeat-x");
		$('table.table3 > tbody > tr:first-child > td:first-child').css('background', "url('../../images/t_top_left.gif') left top no-repeat");
		$('table.table3 > tbody > tr:first-child > td:last-child').css('background', "url('../../images/t_top_right.gif') right top no-repeat");
		$('table.table3 > tbody > tr:last-child > td:first-child').css('background', "url('../../images/t_bottom_left.gif') left top no-repeat");
		$('table.table3 > tbody > tr:last-child > td:last-child').css('background', "url('../../images/t_bottom_right.gif') right top no-repeat");
		$('table.table3 > tbody > tr:even').filter(':not(.trfirst)').filter(':not(.trlast)').children().css('background-color', '#EEEEEE');
	}
	
	interval = setInterval(removeFirst, pause);

	$("#back-top").hide();
	$(function () {
		$(window).scroll(function () {
			if ($(this).scrollTop() > 100) {
				$('#back-top').fadeIn();
			} else {
				$('#back-top').fadeOut();
			}
		});

		$('#back-top a').click(function () {
			$('body,html').animate({
				scrollTop: 0
			}, 800);
			return false;
		});
	});
});
