function tickNews() {
	$('#newsTicker span').each(function(index){
		if ($(this).is(':visible')) {
			$(this).fadeOut('slow',function() {
				if ($(this).html() != $('#newsTicker span:last').html()) {
					$(this).next().fadeIn('slow');
				} else {
					$('#newsTicker span:first').fadeIn('slow');
				}
			});
		}
	})
}
setInterval('tickNews()',5000);
function openPlayer() {
	var maskHeight = $(document).height() + 'px';
	var maskWidth = $(window).width() + 'px';
	$('#mask').css({'width':maskWidth,'height':maskHeight});
	$('#mask').show();
	var playerBoxLeft = ($(window).width() / 2) - ($('#player').width() / 2) + $(window).scrollLeft();
	playerBoxLeft = playerBoxLeft + 'px';
	var playerBoxTop = ($(window).height() / 2) - ($('#player').height() / 2) + $(window).scrollTop();
	playerBoxTop = playerBoxTop + 'px';
	$('#player').css({'top':playerBoxTop,'left':playerBoxLeft});
	$('#player').show();
	$('#player').html('<a href="javascript: closePlayer()" class="close">Inchide filmul</a><iframe src="' + root + 'video/video.html" marginheight="0" marginwidth="0" border="0" borderwidth="0" margin="0" scrolling="no" style="margin: 0px; width: 742px; height: 627px; border-style: none; border-width: 0px; overflow: hidden;"></iframe>');
}
function closePlayer() {
	$('#player').html('');
	$('#player').hide();
	$('#mask').hide();
}
$(document).ready(function() {
	$("a.expandULLink").click(function(e) {
		if ($(this).parents("li").find("ul.innerUL").is(":visible")) {
			$(this).parents("li").find("ul.innerUL").slideUp("fast");
		} else {
			$(this).parents("li").find("ul.innerUL").slideDown("fast");
		}
		e.preventDefault();
	});
	$("#dotariLink").click(function(e) {
		if ($("#dotariBody").is(":visible")) {
			$("#dotariBody").slideUp("fast");
		} else {
			$("#dotariBody").slideDown("slow", function() {
				location.href = "#hpTableHeader";
			});
		}
	});
});
