$(document).ready(function() {
	$.ajaxSetup({
  	global: true,
	cache:false
 	});
	var info_interval;
	info_interval=setInterval(get_shout_info,20000);
	get_shout_info();
	
	jQuery.fn.wait = function(time) {
  		var collector = new ChainCollector(), self = this;
  		// Deal with scoping issues...
  		var fire = function() { collector.fire(self); };
  		setTimeout(fire, Number(time) * 1000);
  		return collector;
		};

	ChainCollector.addMethods(jQuery);	
   	
	
});
function get_shout_info(){ 
	$("#radio_info").load("ajx/get_info.php");
}


function openAjxDivs(page){
	$('#ajx_container').show();
	$('#ajx_layer').show();
	$('#ajx_sub_layer').load(page);
}
function closeAjxDivs(){
	$('#ajx_container').hide();
	$('#ajx_layer').hide();
}
function openContentlessAjxDivs(){
	$('#ajx_container').show();
	$('#ajx_layer').show();
}

function click_to_erase(e,txt){ 
	if(document.getElementById(e).value==txt){
		document.getElementById(e).value='';
	}
	else if (document.getElementById(e).value==''){
		document.getElementById(e).value=txt;
	}
	else {
		return 0;
	}
}

function send_mail(){
	var str= $("#mailform").serialize();
	$("#ajx_load").ajaxStart(function() {
       $(this).show();
     }).ajaxStop(function() {
       $(this).hide();
     });
	$('#ajx_sub_layer').load("ajx/mesaj.php?"+str)
	 
}
function get_program(day){
  		jQuery(".akis-content").fadeOut("slow");
 		jQuery.get("../ajx/get_program.php?day="+day,function(data){
 		jQuery(".akis-content").wait(1).then.fadeIn("slow").html(data);
 		});
 		jQuery("#akis-tabs ul li a").removeClass('active');
 		jQuery("#akis-tabs ul li a").eq(day-1).addClass('active');
  	}

