function loadOnAirTrack() {
	$("#ax-onair").load(getTranslation('axonair-url') + '/current', "", loadOnAirTrack_CB);
}
function loadOnAirTrack_CB() {
	setTimeout("loadOnAirTrack();", 10000);
}

$(document).ready(function(){
	$('#main-menu-list li').hover(function() {
		$(this).addClass('hover');
	}, function() {
		$(this).removeClass('hover');
	});
	
	$("a[rel='external']").attr("target","_blank");
	
	// prettyPhoto
	$("a[rel^='prettyPhoto']").prettyPhoto({
		theme: 'facebook',
		hideflash: true
	});
	
	loadOnAirTrack();
	
	$("#ax-onair-voting-good").livequery('click', function() {
		$("#ax-onair-voting").load(getTranslation('axonairvoting-url') + '/good');
		return false;
	});
	
	$("#ax-onair-voting-bad").livequery('click', function() {
		$("#ax-onair-voting").load(getTranslation('axonairvoting-url') + '/bad');
		return false;
	});
	
	$("#ax-onair-voting-img-good").livequery('mouseenter', function() {
		$(this).attr("src", "images/hand-good-on.png");
	});
	
	$("#ax-onair-voting-img-bad").livequery('mouseenter', function() {
		$(this).attr("src", "images/hand-bad-on.png");
	});
	
	$("#ax-onair-voting-img-good").livequery('mouseleave', function() {
		$(this).attr("src", "images/hand-good.png");
	});
	
	$("#ax-onair-voting-img-bad").livequery('mouseleave', function() {
		$(this).attr("src", "images/hand-bad.png");
	});
	
	$('#donate').hover(function() {
		$('#donate img').attr('src', 'images/donate-hover.png');
	}, function(){
		$('#donate img').attr('src', 'images/donate.png');
	});
});
