/* ©2009 Florian Schommertz */
var speed = 4000;
// Delay Plugin for jQuery
// - http://www.evanbot.com
// - Â© 2008 Evan Byrne
jQuery.fn.delay = function(time,func){
	this.each(function(){
		setTimeout(func,time);
	});
	return this;
};


function doLoad(what, onoff) {
    if (onoff) {
        $("#thepreviewfloater").load(what+"?ajax=ajax");
        $("#thepreviewfloater").css({display:"block"});

    } else {
        $("#thepreviewfloater").css({display:"none"});
    }
}



function updateMyEventFooter(language) {

    var path = "http://www.simpatec.com/aktuell/events/?EventFinder_findRandom&language="+language;
    var td = "#f_eventsfooter";
    
    //alert("me");

	$(td).load(path, 0, function() {
    	$(this).delay(2000, function() {
            updateMyEventFooter(language);
        });
	});
}



    

/*
new Ajax.PeriodicalUpdater('f_eventsfooter', 'http://www.simpatec.com/aktuell/events/?EventFinder_findRandom',
  {
    method: 'get',
    frequency: 10,
    decay: 2
  });
*/

