Cufon.replace('h1');
Cufon.replace('h2');
Cufon.replace('h3');
$(document).ready(function() 
{
	Cufon.replace('#header a',{ hover: true });
});	

$(document).ready(function() 
{
   pollstation();
   setInterval(pollstation, 15000);
   pollstation1();
   setInterval(pollstation1, 15000);
   pollstation2();
   setInterval(pollstation2, 15000);
   pollstation3();
   setInterval(pollstation3, 15000);

});

function pollstation() {
	$.ajax( {
			url: 'playing.php?id='+Math.random(),
			type: 'GET',
			dataType: 'html',
			success: function(stationdata) {
			var lines = stationdata.split('\n');
			var artisttitle = lines[0].split('-');
			$('#currentsong').html('<h2 class="artist">'+artisttitle[0]+'</h2><h2 class="title">- '+artisttitle[1]+'</h2>');
			for (var i = 1; i <= 5; i++)
				$('#prevsong' + i).html(lines[i]);
			}
	} );
};
function pollstation1() {
	$.ajax( {
			url: 'playing1.php?id='+Math.random(),
			type: 'GET',
			dataType: 'html',
			success: function(stationdata) {
			var lines = stationdata.split('\n');
			var artisttitle = lines[0].split('-');
			$('#currentsongStation1').html(artisttitle[0]+' - '+artisttitle[1]);
			}
	} );
};


function pollstation2() {
	$.ajax( {
			url: 'playing2.php?id='+Math.random(),
			type: 'GET',
			dataType: 'html',
			success: function(stationdata) {
			var lines = stationdata.split('\n');
			var artisttitle = lines[0].split('-');
			$('#currentsongStation2').html(artisttitle[0]+' - '+artisttitle[1]);
			}
	} );
};
function pollstation3() {
	$.ajax( {
			url: 'playing3.php?id='+Math.random(),
			type: 'GET',
			dataType: 'html',
			success: function(stationdata) {
			var lines = stationdata.split('\n');
			var artisttitle = lines[0].split('-');
			$('#currentsongStation3').html(artisttitle[0]+' - '+artisttitle[1]);
			}
	} );
};
function pollstation4() {
	$.ajax( {
			url: 'playing4.php?id='+Math.random(),
			type: 'GET',
			dataType: 'html',
			success: function(stationdata) {
			var lines = stationdata.split('\n');
			var artisttitle = lines[0].split('-');
			$('#currentsongStation4').html(artisttitle[0]+' - '+artisttitle[1]);
			}
	} );
};









$(document).ready(function() {
	$("#about").fancybox({
		'autoScale'     	: true,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	}),
	$("#contact").fancybox({
		'autoScale'     	: true,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	}),
	$("#links").fancybox({
		'autoScale'     	: true,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	})
});

