$.fn.longPoll = function(options){
    var defaults = {
        type: "GET",
        url: "http://stream.rcn-radio.org/lab/on_air/titrage",
		req: null,
        parameters: "",
        dataType: "jsonp",
        onSuccess: null,
        onError: null,
        timestamp: 0
    };
    var options = $.extend(defaults, options);

	
	function lpStart(options)
	{
		$.getJSON("http://stream.rcn-radio.org/index.php/on_air/titrage" +"?timestamp="+options.timestamp+"&callback=?", function(data) {
    		options.onSuccess.call(this, data);
			options.timestamp = data.timestamp;
			setTimeout(function(){
                    lpStart(options)
                }, 1000)
		});
	}
	lpStart(options)
}
