// Javascript Functions

function dosearch(e) {
	var key=e.keyCode || e.which;
	if (key==13) document.location.href=site + 'search/' + $('#text').val();
	return false;
}

$(document).ready(function(){
	$("#playlist img").click(function(){		
	var youtubeID=$(this).attr("id");
	$("#mainvideo").empty();
	$("#mainvideo").append('<object width="700" height="420"><param name="movie" value="http://www.youtube.com/v/'+youtubeID+'&rel=1&autoplay=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/'+youtubeID+'&rel=1&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="700" height="420"></embed></object>');
	});
});

jQuery(document).ready(function() {
	jQuery('#playlist').jcarousel();
});

$(document).ready(function(){
	if ( $("#advert").html() == "{BANNER2}" ){
		$("#advert").html(''); 	
	}	
});

function radioPrevButton() {
	$('#archive_container').scrollTo( {top:'-=180px', left:'0'}, 800 );
	return false;
}

function radioNextButton() {
	$('#archive_container').scrollTo( {top:'+=180px', left:'0'}, 800 );
	return false;
}

function newsPrevButton() {
	$('#news_container').scrollTo( {top:'0', left:'0'}, 800 );
	return false;
}

function newsNextButton() {
	$('#news_container').scrollTo( {top:'0', left:'+=708px'}, 800 );
	return false;
}
