/*
 * jZFI JavaScript Library v1.0
 * http://www.zfi.ch
 *
 * Copyright 2011, Daniel Schmutz, ZFI 
 * http://www.zfi.ch
 *
 *
 */

function Adbar() {
	this.timer = null;
	this.index = 0;
	this.start = function() {
		// start adbar interval
//		this.next();
//		this.timer = setInterval("adbar.next()", 7000);
	}
	this.next = function() {
		// start adbar interval
		var _this = this;
		$('#adbar').hide();
		$.ajax({
			  url      : '/ajax/adbar.php',
			  data     : { action : 'next', index : this.index++ },
			  type     : 'GET',
			  dataType : 'html',
			  success  : function(html) {				  
				  $('#adbar').fadeIn('slow').html(html);				  
			  },
			  error    : function(xhr, status) { },
			  complete : function(xhr, status) { }
			});
	}
}

var adbar = new Adbar();

