/**
 * 
 */
function ContentPager(container_id,prev_id,next_id) {  

  var self = this;
  var elements = null;
  var current_element_id = 0;
  var elements = [];
	  
	
	this.init = function() {
		
		$(prev_id).click(function() { self.prev(); });
		$(next_id).click(function() { self.next(); });
	
    	elements = $(container_id +' > div');
    
	   this.showElement(current_element_id);
			
	}
	
	this.hideAll = function() {
		elements.each(function() { 
	      	$(this).hide();
	      });
	}
	
	this.showElement = function(index){
		
		this.hideAll();
		$(elements[index]).show();
		
		
		if(index > 0){
			$(prev_id).show();
		} else {
			$(prev_id).hide();
		}
		
		if(index < elements.length-1){
			$(next_id).show();
		} else {
			$(next_id).hide();
		}
		
		
	}

	this.next = function() {
	      
	  current_element_id++;
	  this.showElement(current_element_id);
	}
	
	this.prev = function() {
	      
	  current_element_id--;
	  this.showElement(current_element_id);
	}	
	

	
	//start();
};
