			var timeout; // declare timeout var so we can get it / kill it later if we need to
			var lastContent; // remember the last thing we got
			var img;
			function refreshSomething ( div, url, seconds ) {
				var d = new Date;
				$.get( url, { d: d.getTime() }, function ( xml ) {
//				$.get( url, {}, function ( xml ) {
					// alert( div + ', ' + url + ', ' + xml );
					// $('#debug').html( $(xml).text( ));
					var newContent = '';
					if (	img = $('now_playing song imageSmall', xml ).eq(0).text( )) {
						newContent += '<img width=90 src="';
						newContent += $('now_playing song imageSmall', xml ).eq(0).text( );
						newContent += '">';
					} else {
						// need random number image loader here
						newContent += '<img src="/themes/radiopopbitch/graphics/coverart/otter1.jpg" />';
					}
					newContent += '<h1>Currently playing:</h1>';
					newContent += '<h2 class="currentHeads">' + $('now_playing song title', xml ).eq(0).text( ) + ' - ';
					newContent += $('now_playing song artist', xml ).eq(0).text( ) + '</h2>';
					newContent += '<h2 class="currentHeadsSub">' + $('now_playing song album', xml ).eq(0).text( ) + '</h2>';
//					newContent += '<h2 class="currentHeadsVote">vote: <a href="/vote/index.php?t=current&v=1&id=' + $('now_playing song persistent_id', xml ).eq(0).text( ) + '">otter?</a> | <a href="/index.php?t=current&v=0&id=' + $('now_playing song persistent_id', xml ).eq(0).text( ) + '">rotter?</a> | <a href="/faq#7">what' + "'" + 's this?</a></h2>';
					newContent += '<h2 class="currentHeadsVote">vote: <a href="/vote?v=otter&i=' + $('now_playing song persistent_id', xml ).eq(0).text( ) + '">otter?</a> | <a href="/vote?v=rotter&i=' + $('now_playing song persistent_id', xml ).eq(0).text( ) + '">rotter?</a> | <a href="/otter">what' + "'" + 's this?</a>| <a href="/vote?v=bad&i=' + $('now_playing song persistent_id', xml ).eq(0).text( ) + '">report as broken</a></h2>';
					newContent += '<h2 class="currentHeadsBuy">click to buy this tune from: ';
					if ( link = $('now_playing song urlApple', xml ).eq(0).text( ) ) {
						newContent += '| <a href="' + link + '">';
						newContent += 'iTunes</a> |';
					}
					if ( link = $('now_playing song urlAmazon', xml ).eq(0).text( ) ) { 
						newContent += '| <a href="' + link + '">';
						newContent += 'Amazon</a> |';
					}
					link = 'http://search.ebay.co.uk/search/search.dll?satitle=' + escape( $('now_playing song artist', xml ).eq(0).text( ))  + '+' + escape( $('now_playing song album', xml ).eq(0).text( ));
					
					newContent += '| <a href="' + link + '">';
					newContent += 'eBay</a> |';

					newContent += '</h2>';
						
					// newContent += ' ' + d;
					if (	lastContent != newContent ) {
						lastContent = newContent;
//						if (	img = $('now_playing song imageLarge', xml ).eq(0).text( )) {
//							$('#img').slideUp().attr( { src: img } ).slideDown('slow');
//						}
						$(div).fadeOut().html( newContent ).fadeIn(); // put in in the text of div id bitToRefresh
					}
					else {	$('#debug').append( div + ' was already ' + newContent + '...' );
					}
					timeout = window.setTimeout('refreshSomething("' + div + '", "' + url + '", ' + seconds + ')', seconds * 1000 ); // call this function again in 'seconds' seconds
				} );
			}
			$( function () { // document.onload but smarter, but requires jquery
				refreshSomething( '.bitToRefresh', '/code/now_playing/now_playing_output.xml', 15 ); // call refresh once to get us going	
				$.get( '/code/now_playing/now_playing_output.xml', {}, function ( xml ) {
					$('title', xml ).each( function () {
						$('#debug').append( '<h2>' + this.nodeName + '=' + $(this).text() + '</h2>' );
						// for ( var i in this ) {
						// 	$('#debug').append( '<br />' + i + ': ' + this[i] );
						//}
					} );
					// $('item', xml ).eq(3).children().eq(4).each( function () {
					// 	for ( var i in this ) {
					// 		$('#debug').append( '<br />' + i + ': ' + this[i] );
					// 	}
					// 	// $('#debug').append( this );
					// } );
				} );
			} );
